Skip to content

[Improvement] Allow None Value for input_date() and update_date() #1713

@mhanf

Description

@mhanf

Currently, when setting the value parameter of input_date() to None, the default behavior in py_shiny is to display the current date, rather than an empty input. This differs from the behavior in R's Shiny, where an empty input is shown when NA is specified.

While a workaround exists by setting the value parameter to pd.NaT, this approach does not apply to update_date(). If the value parameter for update_date() is explicitly set to None, no changes occur, and the same workaround is ineffective.

Proposed Improvement

It would be beneficial to allow users to define a None value for both input_date() and update_date() components that allow to render/update an input date as empty. This change would align py_shiny more closely with the expected behavior in R's Shiny and improve user experience.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions