php - CJuiDatePicker select week -
i trying select week using datepicker in yii . have next code.
<?php $this->widget('zii.widgets.jui.cjuidatepicker', array( 'name'=>'accountingweekselect', 'value' => date('d-m-y'), 'flat'=>true, 'htmloptions' => array( 'size' => '10', // textfield size ), 'options'=>array( 'dateformat'=>'yy-m-dd', 'firstday'=> 5, 'onselect' => 'js: function(datetext, inst){ //$("#accountingweekselect_container").datepicker("setdate",datetext ); }', 'maxdate' => 'today', 'selectweek'=>true, ) )); ?> i liek create work next link. http://2008.kelvinluck.com/assets/jquery/datepicker/v2/demo/datepickerselectweek.html
maybe can utilize onselect day selected , utilize css highlight row. next code logs container , not day select.
'onselect' => 'js:function() { // automatically assign check out date input value console.log(this); }', updated code
$this->widget('zii.widgets.jui.cjuidatepicker', array( 'name'=>'accountingweekselect', 'value' => date('d-m-y'), 'flat'=>true, 'htmloptions' => array( 'size' => '10', // textfield size ), 'options'=>array( //'dateformat'=>'yy-m-dd', 'dateformat'=>'yy-mm-dd', //'firstday'=> 5, 'showothermonths'=>true,// show other month in jquery 'selectothermonths'=>true,// select other month in jquery 'onselect' => 'js: function(datetext, inst){ console.log($("#accountingweekselect_container div table tbody tr td").children("a.ui-state-active").html()); console.log($("#accountingweekselect_container div table tbody tr td.ui-datepicker-current-day").children("a").html()); }', //'maxdate' => 'today', /*'onselect' => 'js:function() { // automatically assign check out date input value console.log(this); }',*/ 'selectweek'=>true, ) )); i have commented out options , still doe snot work. below code source
jquery('#accountingweekselect_container').datepicker({'dateformat':'yy-mm-dd','selectweek':true,'defaultdate':'03-nov-14','altfield':'#accountingweekselect'}); php jquery yii datepicker
No comments:
Post a Comment