A Custom date-picker in Svelte

Rasmus Schultz - Mar 3 '22 - - Dev Community

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. 🙂

. . . . . . . . . . . . . . . . . .