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
Disabled Day of Week setting changes initial date value #1289
Comments
After further investigation I see that explicitly setting However, reading the docs at https://eonasdan.github.io/bootstrap-datetimepicker/Functions/#usecurrent it states that if the field already has a valid value then the use of useCurrent is ignored. In the case described by my previous post this is not the case so I still think this is a bug or the documentation needs amending. |
I have experienced this problem as well -> defaultDate: moment(), fixes my problem |
benr77, you are a life saver!!! The data-date-use-current="false" works like a charm. EXCELLENT job there buddy! |
Hello. Thanks for using my project. We’re closing all tickets/prs for v4 as it is no longer supported. We’re making way for a new version. Please read this blog post |
When using daysOfWeekDisabled - if an existing value is defined in the form field then this is modified upon initialisation to show the next allowable date in the future as defined by the allowable days of the week
<input type="text" class="form-control" id="datetimepicker2" data-date-format="DD MMMM YYYY" data-date-view-mode="months" data-date-days-of-week-disabled="[0,1,2,3,4,5]" value="08 August 2015" />
i.e. if the date is Thursday 27th August and only Saturdays are permitted, the existing form field value is ignored and field value is modified to be the next Saturday in future after the 27th August - in this case the 29th August.
This is before you click on a date field to pop-up the date picker.
See JSFiddle for example behaviour
https://jsfiddle.net/benr77/jou6dwo3/1/
The text was updated successfully, but these errors were encountered: