YiiBooster icon indicating copy to clipboard operation
YiiBooster copied to clipboard

Feature-Request "Date range input" as a filter for "JsonGrid and TbExtendedGridView

Open thebarty opened this issue 12 years ago • 7 comments

Hi guys,

both tables are missing a "Date Range Input"-Support for table-filters.

For example - in a product table: What if a user wants to see/select only the products that where create between 2013/01/01 and 2013/03/03?

thebarty avatar Mar 08 '13 07:03 thebarty

@MikeSmith12222 Man, you should know that the daterange value created by the TbDateRange widget is just a string, which should be nontrivially parsed. ;)

hijarian avatar Mar 10 '13 12:03 hijarian

@hijarian so for example in the json demo grid of the yiibooster (http://yii-booster.clevertech.biz/json-grid.html): Would the json grid understand if I enter "2013/01/01 - 2013/03/03" and only filter the items created between those dates? Is it possible to add a date-range instead of the filter-text-input?

thebarty avatar Mar 10 '13 14:03 thebarty

@MikeSmith12222 What I meant is that it needs to be specifically implemented. For now, there's no way it would be done before the bugfixes in 1.0.6. Sorry for being vague.

hijarian avatar Mar 13 '13 16:03 hijarian

All work. See http://www.yiiframework.com/wiki/318/using-cjuidatepicker-for-cgridview-filter/ for example

magefad avatar Mar 24 '13 17:03 magefad

@magefad What, this feature is already there? That's just great, then!

hijarian avatar Mar 25 '13 12:03 hijarian

One problem - after ajax update grid we need manually run js code to register date range plugin (see step 5 from link)

magefad avatar Mar 25 '13 12:03 magefad

Well, I desperately need someone to untangle the unholy mess which the code of gridviews is. A detail that you noted, @magefad, is just a symptom of a lot larger need to "reinstall" all specific input widgets in the gridview after any ajax updates.

hijarian avatar Mar 25 '13 12:03 hijarian