public function date($name, $value = null, $format = 'yy-mm-dd', $htmlOptions = array())
    {
        $return = Html::get()->mpfScriptFile('jquery.js') . Html::get()->mpfScriptFile('jquery-ui/jquery-ui.js');
        if (!isset($htmlOptions['id'])) {
            $htmlOptions['id'] = 'mdate-time' . str_replace(array('[', ']'), array('_', '__'), $name) . $this->_date_input_count;
            if (WebApp::get()->request()->isAjaxRequest()){
                $htmlOptions['id'] = 'ajax-'.$htmlOptions['id'];
            }            
            $this->_date_input_count++;
        }
        $s = Html::get()->script("$(function(){\$(\"#{$htmlOptions['id']}\").datepicker({dateFormat: '$format'});});");
        return $return . $this->input($name, 'text', $value, $htmlOptions) . $s;
    }
public function date($name, $value = null, $format = 'yy-mm-dd', $htmlOptions = array())
    {
        $return = Html::get()->mpfScriptFile('jquery.js') . Html::get()->mpfScriptFile('jquery-ui/jquery-ui.js');
        if (!isset($htmlOptions['id'])) {
            $htmlOptions['id'] = 'mdate-time' . str_replace(array('[', ']'), array('_', '__'), $name) . $this->_date_input_count;
            if (WebApp::get()->request()->isAjaxRequest()){
                $htmlOptions['id'] = 'ajax-'.$htmlOptions['id'];
            }            
            $this->_date_input_count++;
        }
        $s = Html::get()->script("$(function(){\$(\"#{$htmlOptions['id']}\").datepicker({dateFormat: '$format'});});");
        return $return . $this->input($name, 'text', $value, $htmlOptions) . $s;
    }
public function date ( $ name , $ value = null , $ format = 'yy-mm-dd' , $ htmlOptions = array ( ) ) { $ return = Html :: get ( ) -> mpfScriptFile ( 'jquery.js' ) . Html :: get ( ) -> mpfScriptFile ( 'jquery-ui/jquery-ui.js' ) ; if ( ! isset ( $ htmlOptions [ 'id' ] ) ) { $ htmlOptions [ 'id' ] = 'mdate-time' . str_replace ( array ( '[' , ']' ) , array ( '_' , '__' ) , $ name ) . $ this -> _date_input_count ; if ( WebApp :: get ( ) -> request ( ) -> isAjaxRequest ( ) ) { $ htmlOptions [ 'id' ] = 'ajax-' . $ htmlOptions [ 'id' ] ; } $ this -> _date_input_count ++ ; } $ s = Html :: get ( ) -> script ( "$(function(){\$(\"#{$htmlOptions['id']}\").datepicker({dateFormat: '$format'});});" ) ; return $ return . $ this -> input ( $ name , 'text' , $ value , $ htmlOptions ) . $ s ; }
Get HTML input with jQuery UI date.
@param string $name
@param string $value
@param string $format
@param array $htmlOptions
@return string
Get HTML input with jQuery UI date .