-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Today's button delete the date value #873
Comments
I agree. On a side note, this happens even if you don't click on today, or if Maybe it would be useful to add an option? |
i've implemented an option |
Thanks @dittodhole! |
This same issue means that when you type the date into the input (click on the input then start typing instead of using the calendar UI) and press enter, the date gets cleared (I can't think of any rationale for this to happen) and feels more like a bug than a feature. Note that the commit 73da54b fixes the problem where typing the date and pressing enter causes the date to get deleted. |
The simple reason is, that this component provides toggling of dates - which comes in handy when in multi-date-mode: I click on Monday, Tuesday, then I say "well, Monday was wrong" and click on Monday again and it gets cleared. And in single-date-mode there are ways to "double click" too:
I've simply provided an Someone, someday might think of a better way (eg natural behavior) for disabling the toggling (as mentioned before: does toggling in single-date-mode make sense?) |
Thanks @dittodhole! |
Thanks @dittodhole needed this |
The "clear" toggle was fixed in #843 |
With the parameter todayBtn: "linked"
if you click on Today, it displays the current day BUT if it's already the current day or if you click twice on Today it deletes everything. I think it shouldn't do that.
You can reproduce it on the official demo :
http://eternicode.github.io/bootstrap-datepicker/?markup=input&format=&weekStart=&startDate=&endDate=&startView=0&minViewMode=0&todayBtn=false&language=en&orientation=auto&multidate=&multidateSeparator=&keyboardNavigation=on&forceParse=on#sandbox
The text was updated successfully, but these errors were encountered: