ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: queensgambit9 on January 15, 2019, 03:34:56 pm

Title: Datepicker
Post by: queensgambit9 on January 15, 2019, 03:34:56 pm
When applying a filter, column using datepicker seems to have defaultDate set to earliest date available currently in grid. Would this be possible to modify to use today's date?
Title: Re: Datepicker
Post by: paramvir on January 15, 2019, 07:43:41 pm
datepicker defaultDate option can be set with column.filter.dpOptions

https://paramquery.com/pro/api#option-column-filter

http://api.jqueryui.com/datepicker/#option-defaultDate

dpOptions usage is also shown in this example: https://paramquery.com/pro/demos/filter_custom
Title: Re: Datepicker
Post by: queensgambit9 on January 15, 2019, 08:00:32 pm
Thanks, did try (for todays date):

Code: [Select]
...{ crules: [{ condition: 'between' }], dpOptions: { defaultDate: null } }...
but can't get it to work.
Title: Re: Datepicker
Post by: paramvir on January 15, 2019, 11:25:27 pm
Please set { defaultDate: new Date() } instead of null