kartik-v / yii2-date-range

A Date Range Picker for Bootstrap useful for reports and filtering.
http://demos.krajee.com/date-range
Other
93 stars 81 forks source link

Use the yii2-date-ranger in yii2-grid drop in loop to load the page with new version(v1.6.7) #64

Closed weiforrest closed 8 years ago

weiforrest commented 8 years ago

I use the DateRangerPick like this as a column : [ 'attribute' => 'time', 'format' => ['date','php:Y-m-d'], //'class' => 'kartik\daterange\DateRangePiker' 'filterType' => GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => [ 'presetDropdown' => true, 'pluginOptions' => [ 'locale' => [ 'separator' => ' to ', 'format' => 'YYYY-MM-DD', ], ], ], ], with old version, it work good, but for today have little problem. when i upgrade for new version(v1.6.7). I found the page drop into loop like: get this request: http://127.0.0.1:8080/index.php?DeliverySearch%5Btime%5D=03%2F15%2F2016+-+03%2F15%2F2016&DeliverySearch%5Bcustomer_id%5D=&DeliverySearch%5BdetailCount%5D=&DeliverySearch%5Bmoney%5D=&DeliverySearch%5Bprofit%5D=&r=delivery%2Findex

The Web Console show this error: VM124 index.php?DeliverySearch[time]=03%2F15%2F2016+-+03%2F15%2F2016&DeliverySearch[customer_id]=&D…:30 Uncaught TypeError: moment.weekdaysStart is not a function

The Source locate in this: var kvGridExp_df43f813={"gridOpts":kvGridExp_16f6c083,"genOpts":kvGridExp_383dfdd3,"alertMsg":"将会导出JSON文件以供下载","config":{"colHeads":[],"slugColHeads":false,"jsonReplacer":function(k,v){return typeof(v)==='string'?$.trim(v):v},"indentSpace":4}}

So. what i could do for it? Downgrade?Thanks You for your patience!

Please close it, I found the resolve in the pull request. the weekdaysStart is wrong by weekdaysShort

kartik-v commented 8 years ago

Resolved via #65.