Can someone tell me how to use the jquery-datepicker for a date range in yii? I got it to work for a single date how do i modify it to get a multiple dates. I am new to yii framework.
A JavaScript component for choosing date ranges, dates and times. Originally created for reports at Improvely, the Date Range Picker can be attached to any webpage element to pop up two calendars for selecting dates, times, or predefined ranges like "Last 30 Days".
Setting a start and end datevar start_date = new Date(). increment('week', 1); var end_date = new Date(). increment('week', 5); This will allow the picking of dates between one week and five weeks in the future.
An input element that is to be updated with the selected date from the datepicker. Use the altFormat option to change the format of the date within this field.
Try This For Example:
<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
'model'=>$model, 'attribute'=>'birthday',
'options'=>array(
'dateFormat'=>'yy-mm-dd',
'yearRange'=>'-70:+0',
'changeYear'=>'true',
'changeMonth'=>'true',
),
)); ?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With