Repository navigation
fix(input_date): datesdisabled ignored non-default format - #2523
Merged
cpsievert merged 3 commits intoOct 7, 2026
Merged
Conversation
Ran `make upgrade-html-deps`. Pulls rstudio/shiny@main (bbc43849, the #4434 merge commit) and rstudio/bslib@main (97aa1abc -> ac1e25f8).
Emit data-dates-disabled instead of data-date-dates-disabled so the dates are parsed as yyyy-mm-dd by the client binding rather than by bootstrap-datepicker with the display format. Omit the attribute when datesdisabled is None. Update InputDate.expect_datesdisabled() to match. Needs the shiny.js from rstudio/shiny#4434.
taekop
force-pushed
the
fix-input-date-datesdisabled-format
branch
from
October 5, 2026 04:41
7dc7b38 to
848d700
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(input_date): datesdisabled ignored non-default format
Port of rstudio/shiny#4434 (fixes rstudio/shiny#4281) to
ui.input_date(). cpsievert asked for this port in the review on rstudio/shiny#4434.datesdisabledis alwaysyyyy-mm-dd, but it was emitted asdata-date-dates-disabled, which bootstrap-datepicker picks up itself and parses with the displayformat. With any non-defaultformatthe dates never matched, so nothing was disabled.Changes:
ui.input_date()now emitsdata-dates-disabled(notdata-date-*), so the client binding parses it asyyyy-mm-dd, the same way it handlesmin/max. The attribute is omitted whendatesdisabledisNone.controller.InputDate.expect_datesdisabled()checks the new attribute (and expects it to be absent forNone). The description in the generated testing docs is updated to match.build:commit (first commit), generated withmake upgrade-html-depsagainst rstudio/shinymainat bbc43849, which is the merge commit of fix: dateInput() datesdisabled ignored non-default format (#4281) rstudio/shiny#4434. The shiny JS change in that commit is exactly the #4434 change (13 added lines inshiny.js, plus the regenerated.min.jsand source maps). The same run also picked up the current rstudio/bslibmain(97aa1abc -> ac1e25f8):bslib/componentsCSS/JS,page_sidebar.scss,toolbar.scss, and the regenerated bootstrap CSS. The commit totals 16 files, +57/-32.dd/mm/yyyyandmm/dd/yy, and that the value survives a 2-digit-year format.input_date_range()has nodatesdisabledargument (same asdateRangeInput()in R), so nothing changes there.Testing (local, chromium):
mainand with only the Python change on top of the old vendored JS ([] == ['1', '2']: no days disabled). It passes with thebuild:commit.tests/pytest: 1226 passed, 6 skipped.input_datepicker,input_daterange,test_input_date,test_input_date_range,test_inputs_update, and theai_generated_appsinput_date/input_date_rangecore and bookmark apps): 12 passed.uv run make format check-lint check-typespass.testing-documentation.jsonwas edited by hand becausemake update-testing-docsneeds quarto and repomix, which are not available here. It matches what the generator would produce: the description column is the first line of the docstring, and the signature is unchanged.