Skip to content

Implement a DateTimePicker widget#48

Open
fnawratil wants to merge 1 commit intodisberd:masterfrom
fnawratil:feature/DateTimePicker
Open

Implement a DateTimePicker widget#48
fnawratil wants to merge 1 commit intodisberd:masterfrom
fnawratil:feature/DateTimePicker

Conversation

@fnawratil
Copy link
Copy Markdown
Contributor

This PR adds a new widget supporting the native datetime-local input field in browsers.

@fnawratil fnawratil force-pushed the feature/DateTimePicker branch from ca76233 to ff481d4 Compare October 4, 2025 17:48
Comment thread src/basic_widgets.jl
Base.get(dtp::DateTimePicker) = dtp.default
Bonds.initial_value(dtp::DateTimePicker) = dtp.default
function Bonds.transform_value(dtp::DateTimePicker, val)
something(tryparse(DateTime, val, dateformat"YYYY-mm-ddTHH:MM"), DateTime(1970,1,1))
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you found instances where tryparse fails and have an idea of why?
I think in general the default fallback deserves a mentions in the docstring

@disberd
Copy link
Copy Markdown
Owner

disberd commented Oct 6, 2025

Nice, I think apart from the review comment about adding mention to the fallback, it would be good to add this in a easy example to the test/notebooks/basic_widgets.jl notebook, and also use that to record a small example of this in action to be added at the end of the docstring.

Since last version, we have a new orphan branch that is just used to store all assets (images, videos, html) so that it's easier to link to stuff in the docstring and documentation pages.
I used to rely on pasting videos/images on PR comments and just link to that, but now all of those assets are blocked behind a JWT token which expires so can't be reliably used anymore to easily host.

The new orphaned branch is https://github.com/disberd/PlutoExtras.jl/tree/assets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants