-
Notifications
You must be signed in to change notification settings - Fork 189
default_date false results in default selection of today #158
Comments
This behavior might not be described perfectly, it is actually used in conjunction with |
Ah, ok. Thanks. Is there any way to have the datepicker without a default selection on load? I can see we already have a class for pmu-today , it would be to essentially clear .pmu-selected, until a selection is made by the user. |
You can always apply custom logic for showing which dates are selected by using https://github.com/nazar-pc/PickMeUp#selectingdisabling-dates-with-custom-logic |
Got you, i've tried setting selected: false within the render callback however this doesn't appear to be working. Disabled works to disable the current date however today's date still holds the class pmu-selected. Am I approaching this wrong? - CP updated : http://codepen.io/anon/pen/pRyKgX |
It only worked with |
Thanks can see this working. I think i've misinterpreted its function as setting false within the render callback would permanently prevent selection of that date. I think as you suggest, it may be best to respect default_date: false here, preventing a default date selection, but allowing for a selection to be made by the user. Essentially the use-case is that there are several instances in which one would want a datepicker without any default date selected, but allowing a user to select any date from it. |
Docs state that setting default_date option to false will "keep empty value until date selected"
Expected behaviour: datepicker will have no default date selection
Actual result: today's date is selected by default
Codepen: http://codepen.io/anon/pen/pRyKgX
The text was updated successfully, but these errors were encountered: