DEV Community

Cover image for A Custom date-picker in Svelte
Rasmus Schultz
Rasmus Schultz

Posted on

6 2

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

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (3)

Collapse
 
renanfranca profile image
Renan Franca

Do you have this component in AngularJs?

Collapse
 
mindplay profile image
Rasmus Schultz

I did, many years ago - I'm afraid I haven't been very good at archiving these. I sort of want to go back and find or recreate them in different frameworks for comparison... That would be quite a lot of work though. I haven't always published these - a lot of times, it's just been something I do, as test for the framework, and as an exercise for myself. 🙂

Collapse
 
renanfranca profile image
Renan Franca

It's cool! Thanks ☺️

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →