You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.
I'm working with two datepicker elements to select start and end dates, the second one's start date is setting up as the selected date in the first one (and loking previous dates to be selected), all seem to be OK until I selected the first day for the following months as 'From' date:
April, June, October and November (I don't know if is the issue is because these months have 31 days, I looked other issue reports and I found this one https://github.com/fengyuanchen/datepicker/issues/195 but no more details have been added)
After pick it, all the dates for the months mentioned are locked and only dates starting one month after are available to select in the 'To' field (May, July, November and December ).
Is important to mention that if I select the second day instead 1st one for the months mentioned all work fine (in other words the issue only is presented when I select 1st day, the year is not a factor; please see attached pictures).
Issue example (selecting April 1st 2018 all April dates are locked in the second datepicker)
_Selecting April 2nd (Starting date set correctly in the second datepicker) _
I have the same problem and know what is causing it: the conversion to different languages/dates.
I have two calendars. The second one gets the startDate from the first calendar. But if i set the first calendar to '14.09.2021' (14th September), the second calendar starts on '14.10.2021' (14th October). So it skips an entire month.
I only get this problem when working with 'de-DE' language. Even when I use following methods:
jQuery(this).datepicker('setStartDate', '14.09.2021'); //September
jQuery(this).datepicker('setDate', '14.09.2021'); //September
So I hardcoded the date and it still shows '14.10.2021'. //October
But when I use default english settings, this works perfectly fine:
jQuery('.uBis').datepicker('setStartDate', '09-14-2021');//September
jQuery('.uBis').datepicker('setDate', '09-14-2021');//September
Can you please take a look at the problem, I really need to work with german language asap. Would really help me out :)
Exact same issue for me and I am using latest version 1.0.10
In english it works fine but for german it isn't and issue happens for Feb, Apr, Jun, Sep and Nov
The fix for this issue is very simple, this issue happens when current-date is greater then the max-date of month to which you are changing your date.
e.g: if we change date on 31st march to any date in May
To fix this, you can update datepicker.js file:
find "parseDate" and update date.setMonth(value-1) to date.setMonth(value-1,1)
Datepicker version 1.0.7
Greetings:
I'm working with two datepicker elements to select start and end dates, the second one's start date is setting up as the selected date in the first one (and loking previous dates to be selected), all seem to be OK until I selected the first day for the following months as 'From' date:
April, June, October and November (I don't know if is the issue is because these months have 31 days, I looked other issue reports and I found this one https://github.com/fengyuanchen/datepicker/issues/195 but no more details have been added)
After pick it, all the dates for the months mentioned are locked and only dates starting one month after are available to select in the 'To' field (May, July, November and December ).
Is important to mention that if I select the second day instead 1st one for the months mentioned all work fine (in other words the issue only is presented when I select 1st day, the year is not a factor; please see attached pictures).
Issue example (selecting April 1st 2018 all April dates are locked in the second datepicker)
_Selecting April 2nd (Starting date set correctly in the second datepicker) _
Finally, as reference the code I'm using:
For the datepickers inicialization
For setting the startdate of datepicker 'To' (locking all the previous dates):
Thanks
The text was updated successfully, but these errors were encountered: