-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Update date components #405
Conversation
# initially no change | ||
time.sleep(.5) | ||
dash_duo.wait_for_text_to_equal("#out-2000", "None", timeout=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could add the nice with pytest.raises
pattern you used in #407
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃
Great job on the update! I have a datePickerInput with type="range" and debouce=True. Now, the callback should be triggered as I click the second date on the datePickerInput (as this action also closes the date picker). The problem is that the callback is not triggered when the date picker closes, but only after I click anywhere on the page. I don't know if this is the expected behaviour, but I thought I might report it. |
Hi @Ferreira-B For your use-case, you could try setting |
Closes #403
debounce=True
toDatePicker
highlightToday
propclearable
DateInput
whendebounce=True
Notes on adding
debounce
to theDatePicker
The input field in
DatePicker
behaves differently fromDateInput
in Mantine:DateInput
, users can type a date directly into the Input field (or select from a calendar). Pressing Enter will make the input lose focus, updating the value.DatePicker
users cannot type directly into the input field. Pressing Enter or clicking on the field opens the calendar, shifting the focus to it. The value is only updated by selecting dates from the calendar. Then_submit
prop (counter for enter key pressed) has limited use here and is being kept only for legacy reasons (remove in a future major release?).onBlur
Behavior:DateInput
, the onBlur countern_blur
is useful for detecting when a user finishes typing or selecting a date.DatePicker
,n_blur
isn’t useful because the focus shifts from the input to the calendar triggering the counter. Then_blur
counter doesn't indicate that the user has finished entering an input, so it is not included in this component.