Closed ekzobrain closed 9 years ago
Also, convertFormat class variable is not defined in class DateRangePicker leading to increased memory usage by that class object. Also, documentation about pluginOptions['format'] param should be updated, till it was moved to pluginOptions['locale']['format'] by 1.6.4 update.
I was able to overcome this issue by setting autoUpdateInput daterangepicker option to True. But now I have to provide a callback to manually set input's value. Seem like new version of the plugin does not like empty startDate and endDate values and if they are not provided - sets them automatically to some default value, and updates input - so filter form is submitted. The only two solutions that I see are:
Also, documentation about pluginOptions['format'] param should be updated, till it was moved to pluginOptions['locale']['format'] by 1.6.4 update.
This was already updated in docs with the update. Release v1.6.4 uses the latest release 2.1.3 of the bootstrap-daterangepicker plugin - so you must change your code as per the source plugin changes.
Also refer Release v1.6.4 notes.
These settings a related not to daterangepicker widget itself, but only when it is used as a filter in GridView, so I think, that GridView class should set these options.
I feel each developer rather needs to configure it for their need using the GridView filter Widget Options based on their use case. If you have any suggestions for enhancement let know.
I've the same issue, version number doesn't suggest such changes ... add necesary config option to override this (autoUpdateInput), please :)
Same problem here.
The plugin tries to set a daterange automatically in the input.
@XzAeRo downgrade to 1.6.3 - works fine until @kartik-v will make some changes :))
@ekawalec thanks!
Note that the options like autoUpdateInput
is an update to the source plugin and new config options and changes to plugin settings are to be referred in the plugin docs (or you need to reach out to the plugin author if you have feedback or suggestions for the plugin). On your query of where to set in this widget -- all plugin properties can be set within the widget's pluginOptions
- so I am not clear where the issue is.
I can include a link to refer the plugin updates in the docs. Will probably try and see if I can default some settings - but again its left to each developer's use case how they want to configure it.
It seems a problem with source plugin that sets null values to a default current date and I think I will evaluate the suggestion by @soulhunter1987
- Provide default value for filter input (not always appropriate)
- Set autoUpdateInput to false and always provide a callback (if not provided by user) for setting input value
Ok this is fixed via update to release v1.6.5 (currently in dev-master).
New property autoUpdateOnInit
is added to the widget which defaults to false
. If set to false
it will override the plugin's default behavior of setting a value on Initialization and triggering the change causing the infinite loop.
@kartik-v thank you!
Thanks, seems to work OK now. It may be not a problem, but an expected behavior of source plugin. But it may also be a bug. I will open an issue there and provide a link to it.
After updating to v1.6.4 my grid view is refreshing infinitely. I use daterangepicker as a filter for datetime column. Default filter value is empty, but after page load some value is inserted into filter input and grid form is submitted.