rodloboz
After Kotoba, the next thing I wanted to build for Phoenix projects was dates. The browser’s date input looks different everywhere, doesn’t do ranges, and the moment you need “only weekdays” or “pick a free time slot” you end up pulling in a JS date picker and wiring it to LiveView by hand.
So I built Koyomi (暦, “calendar”), date pickers for Phoenix that support:
- a day, a range, several days, a month, an ISO week, a year, a time and a day + time (in a time zone)
- repeat rules (RFC 5545 RRULE)
- dates typed in words: “next friday”, “in 3 weeks”, “15–20 mar”
- any locale and the browser’s calendar systems (Japanese, Persian, Hebrew…), with the locale’s first day of the week, digits and direction
- the same rules in the browser and in your changeset
- Ecto types, including Postgres
daterange/tstzrange, and text or JSON for SQLite and MySQL Koyomi.Testto pick values in LiveViewTest without a browser
The pickers ship as a prebuilt bundle in the Hex package, so no Node.js: you add the hook and one stylesheet.
Type dates in words and get a preview
Pick ranges across months
Offer time slots from your LiveView, and the rules disable what your changeset refuses
Build repeat rules and see the next dates
And read them back on the server
All the screenshots are from Notebook, the demo app I also use for Kotoba. Clone it, run mix setup and mix phx.server to try every picker.
Same as with Kotoba, I pushed hard for a rich feature set and nice default styles. Would love to get your feedback and if you find bugs or have feature requests Issues are open and PRs are welcome.
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #code-sync
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #elixirconf-us
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #security
- #elixirconf-eu
- #processes
- #api
- #forms
- #hex

















Showing Posts 1 to 5- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
roeland
Nice, this was on my list after AddToCalendar - server-side "add to calendar" links + ICS generation for Phoenix LiveView . I will take a look at it to see if it matches what I need and contribute otherwise. Thanks!
rodloboz
Thanks! Any contributions to improve it are welcome
widianto
Nice work. Thanks!
Starred it.
rodloboz
Thanks @widianto
abrookewood
That looks incredible.