-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need minDate, maxDate support please #399
Comments
You should use filter_plugin_options (read docs) you can feed it with any options you like and it will be passed "as is" to your third party plugin, for example Next time please ask questions on stackoverflow and tag with yadcf |
Thank you and I apologize for not seeing that before. However, after testing it, it appears to have the same bug as my own implementation (which I've since removed). After setting the entries the first time and clearing them out (reset), the start date defaults back to "today's" date which based on my settings shouldn't even be an option. So to put it into a visual, the first time I click on the date fields, it show's my date limits fine. After resetting it, if I go back to select a start date again, the start date field defaults to today's date which is outside of my minDate and maxDate range. So I feel there is still some sort of bug with the reset operation. |
Ok, please provide a minimal test case (jsfiddle / etc) so i can reproduce
and fix it
…On Apr 13, 2017 5:35 PM, "Jose R. Lopez" ***@***.***> wrote:
Thank you and I apologize for not seeing that before. However, after
testing it, it appears to have the same bug as my own implementation (which
I've since removed). After setting the entries the first time and clearing
them out (reset), the start date defaults back to "today's" date which
based on my settings shouldn't even be an option.
So to put it into a visual, the first time I click on the date fields, it
show's my date limits fine. After resetting it, if I go back to select a
start date again, the start date field defaults to today's date which is
outside of my minDate and maxDate range. So I feel there is still some sort
of bug with the reset operation.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#399 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABmiX2-gSh0e0kP35o_1TmCbSPvptM7Yks5rvjKegaJpZM4M7kTC>
.
|
Sure thing, here is the example: https://jsfiddle.net/6n7bn2tx/ You can see when you try to select the date the first time, the range is limited (as it should) but as soon as you click the "reset" button it seems to dismiss the range and defaults the picker to "today's" date. Please note I didn't give the example much attention other than making sure it had a date range to play with. |
@momon , take a look at the following jsfiddle page it uses the newest yadcf beta (in resources), see if solves your issue and let me know |
@vedmack that example does seem to be behaving as expected so looks like it's been fixed in the beta already. Thanks! |
support for min/max date on range date resetIApiIndex #399
@momon please use the yadcf beta 0.9.2.beta.8 in case of any issue let me know |
I have noticed that when using the range_date filter I can't specify a minData and a maxDate for the form fields. In my case scenario it would ideally do it automatically based on the dates available in the table but that isn't the case.
I have temporarily enforced them by using:
This works on page load but as soon as the filter is cleared there appears to be a "reset" function that dismisses my hardcoded values.
So I'm not sure if my use scenario here is too custom but could probably be resolved by allowing to input custom minDate and maxDate on the jquery datepicker or alternatively automatically assume minDate and maxDate based on the dates in the table (which makes total sense to me).
The text was updated successfully, but these errors were encountered: