Reputation: 2793
in my code i used first day to set the day names starting from monday ... sunday. the code snippet is
$( ".txt_calender" ).datepicker({
minDate: 0,
firstDay: 1,
dateFormat: '<?php if (isset(Yii::app()->session['jsDateFormat']))
{
echo Yii::app()->session['jsDateFormat'];
} else
{
echo 'm/d/Y';
} ?>'
});
but when i click the textbox, it shows day names starts from sunday. what is the issue with the code snippet.
Upvotes: 0
Views: 1624
Reputation: 10260
Have you tried setting it after init like
$( ".txt_calender" ).datepicker({
minDate: 0,
dateFormat: '<?php if (isset(Yii::app()->session['jsDateFormat']))
{
echo Yii::app()->session['jsDateFormat'];
} else
{
echo 'm/d/Y';
} ?>'
});
$( ".txt_calender" ).datepicker( "option", "firstDay", 1 );
Upvotes: 1