dateFormat = $dateFormat; $this->valueFormatted = $valueFormatted; $this->weekStartsOn = $weekStartsOn; } public function render() { static $jsShown = FALSE; /* hidden field to store our value */ $hidden = $this->htmlFactory->makeInputHidden( $this->name(), $this->value ); /* text field to display */ $display_name = $this->name() . '_display'; $text = $this->htmlFactory->makeInputText( $display_name, $this->label, $this->valueFormatted ); $text ->addAttr( 'class', 'hc-datepicker2' ) ->addAttr( 'readonly', 'true' ) ->addAttr( 'class', 'hc-xs-block' ) ->addAttr( 'data-date-format', $this->dateFormat ) ->addAttr( 'data-date-week-start', $this->weekStartsOn) // ->addAttr( 'data-date-end-date', '25 Apr 2022' ) ; // $text = $this->app->make('/form/text') // ->addAttr('data-date-week-start', $t->weekStartsOn) // ; $js = NULL; if( ! $jsShown ){ ob_start(); ?> htmlFactory->makeCollection( array($hidden, $text, $js) ); return $out; } }