-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
Date inputs have string bindings, which are rarely helpful.
Describe the solution you'd like
It should be possible to specify the type of binding:
<input type="date" bind:value|date={date_as_date}>
<input type="date" bind:value|number={date_as_number}>
<input type="date" bind:value|string={date_as_string}>In v4, we can switch the default over to the value|date behaviour.
Describe alternatives you've considered
Adding valueAsNumber and valueAsDate bindings. There are a couple of reasons not to do this:
- It would introduce an inconsistency with how
numberandrangeinputs are currently handled - Resolving that inconsistency would mean expecting people to type
valueAsNumberinstead of justvalue. It's unergonomic - Having multiple binding options makes it easy for someone to use them all simultaneously, which could lead to subtle bugs from not having a single source of truth
How important is this feature to you?
Medium
christiankaindl, tanhauhau, elisp, qutran, carloslfu and 39 morejimmywartingcarloslfu, Nokorbis, MarioGruda, CindyKee, repsac-by and 4 moreemmnull, PuruVJ and Malix-Labs