Skip to content

Instantly share code, notes, and snippets.

@DrMabuse23
Created June 3, 2013 08:29
Show Gist options
  • Save DrMabuse23/5696853 to your computer and use it in GitHub Desktop.
Save DrMabuse23/5696853 to your computer and use it in GitHub Desktop.
<?php
$this->widget('zii.widgets.jui.CJuiDatePicker',
array(
// you must specify name or model/attribute
'model' => $model,
'attribute' => 'geb_dat',
// 'name'=>'Teilnehmer[birthday]',
// optional: what's the initial value/date?
'value' => '1960-01-01',
// optional: change the language
'language' => 'de',
'flat' => false,
//'themeUrl' => '/css' ,
//'theme'=>'ui', //try 'bee' also to see the changes
//'cssFile'=>array('/jquery-ui-1.8.16.custom.css'),
// optional: jquery Datepicker options
'options' => array(
// how to change the input format? see http://docs.jquery.com/UI/Datepicker/formatDate
'dateFormat' => 'yy-mm-dd',
// user will be able to change month and year
'changeMonth' => 'true',
'changeYear' => 'true',
'yearRange' => '1920:1995',
// shows the button panel under the calendar (buttons like "today" and "done")
'showButtonPanel' => false,
// this is useful to allow only valid chars in the input field, according to dateFormat
'constrainInput' => 'false',
// speed at which the datepicker appears, time in ms or "slow", "normal" or "fast"
'duration' => 'fast',
// animation effect, see http://docs.jquery.com/UI/Effects
'showAnim' => 'slide',
),
)
);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment