JuliaPluto / PlutoUI.jl

https://featured.plutojl.org/basic/plutoui.jl
The Unlicense
299 stars 54 forks source link

Adding `TimePicker` #179

Closed icweaver closed 2 years ago

icweaver commented 2 years ago

Hey all, happy new year! Just following up on #169. Sort of flying by the seat of my pants here, but is this kind of what we had in mind for it? Happy to add in DatePicker + some docs next if this is starting on the right track

Demo

Screenshot from 2022-01-04 22-21-05

github-actions[bot] commented 2 years ago

Try this Pull Request!

Open Julia and type:

  julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/icweaver/PlutoUI.jl", rev="dates_picker")
julia> using PlutoUI

Or run this code in your browser: Run with binder

fonsp commented 2 years ago

This is awesome!! Let's do the DatePicker in a new PR?

fonsp commented 2 years ago

Some extra comments:

Then about seconds: It looks like the <input type=time step=1> element will show seconds (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time#time_value_format).

About min/max: it looks like the min and max attributes have no effect in Chrome, so it's probably not worth the effort to implement them.

icweaver commented 2 years ago

Sounds good, thanks for the tips! I think I am going to be a little pressed for time this week, but can definitely get this started sometime this weekend!

TIL renaming a branch (even on a draft PR) deletes the original, my b