6

A Custom date-picker in Svelte

 2 years ago
source link: https://dev.to/mindplay/a-custom-date-picker-in-svelte-594o
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Cover image for A Custom date-picker in Svelte

A Custom date-picker in Svelte

I have this fairly small, but fully functional, custom date-picker UI control, which I've been porting between UI frameworks for quite a few years.

I ported this example to Svelte about 3 years ago, and today I decided to update it to Svelte 3.

Try it out 🚀

I always try this first with any new framework to see how they stack up. Perhaps the most important thing demonstrated by this use case, is the ability to validate and conditionally accept a value into the control's internal date state - and the ability to modify the control's view state by navigating through months without changing the value.

(it was quite a departure from the old version, in case you'd like to compare.)

There's not a lot more to say about this. Enjoy. 🙂


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK