-
Notifications
You must be signed in to change notification settings - Fork 1k
minDate/maxDate problem #28
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
Comments
Do you get any errors? or just acting funny? To be completely honest there has not been much testing on multiple input fields.. |
The only error I got was when trying to swap datepicker for datetimepicker on the rows:
And that was only the "there is no X for undefined" error |
A user submitted many changes last night and I committed them, can you see if this version 0.8.1 fixed it? (it may not have, there were a ton of changes however) |
It works better but it still behaves strange and once again I don't really have the time to look into this at work but the debugging I did points to the setDate function. It doesn't change the date of the other input field and the disabling of earlier and later dates work. However, it still changes the time to what I described in my original post. It should be noted that the datepicker dialog closes once a date is selected but that is due to line 560 being one row down, easy fix. I wish I had time to really dig into this but I'm buried in stuff to do at the moment. |
Hello everybody and, first, congratulation to trentrichardson for his job. I also have au little problem with the beforeShow what seems to not work. Thanks for your advices. My version of dateTimePicker is 0.9.1 My code is :
|
Hello Jean, Please open a separate Issue, as you are not having a minDate/maxDate problem. I've also changed the way beforeShow is called, you can try pulling from my dev branch. |
Thanks for your advice, doublerebel. Following your recommandation, il maded a new issue for my beforeshow problem. You said also I can try pulling from your dev branch. Where can I found that dev branch. Sorry il that question seems basic, but I don't where to look. |
If you go to doublerebel's timepicker page there is a button on the top left for Branches, choose his unstable branch |
Thanks, Here is my code :
|
Hello
I have a form that contains two input fields, each with a datepicker. After adding the timepicker addon it does not work as intended.
When selecting a date in the first datetimepicker it should set the minDate of the second one but ends up changing the actual date in it while at the same time messing up the hours.
When the hours are set to a value below or equal to 12 in the first input field it becomes 00 in the second. If the hours are above 12 the value in the second input field is equal to the set value + 2.
The code used for min/max dates is the one posted below.
onSelect : function(selectedDate) {$.datepicker.parseDate(instance.settings.dateFormat || $ .datepicker._defaults.dateFormat, selectedDate, instance.settings);
var option = this.id == "dateFrom" ? "minDate" : "maxDate";
var instance = $(this).data("datepicker");
var date =
datePickers.not(this).datetimepicker("option", option, date);
}
Now it is not impossible that I have missed some aspect to using this addon and that the above code is faulty and if so is I apologize but I have been at this problem for a few hours now and it is driving me crazy. :)
I have done some debugging and at least the time issue seems to located to the $.datepicker._setDate function at line 828 but I might be wrong.
It should be noted I am using the latest version, 0.8.
Any help or insight is appreciated
Regards
Robert Krantz
The text was updated successfully, but these errors were encountered: