Is there a normal, no-frills, no-fuss date-time picker that can be used in normal applications? #18796
Replies: 2 comments
|
For the no-dependency version, use the browser's native control. Svelte's normal value binding works with it: <script>
let value = $state('');
</script>
<label>
When
<input
type="datetime-local"
bind:value
min="2026-01-01T00:00"
step="60"
/>
</label>
<p>Selected: {value || 'nothing yet'}</p>The bound value is a string such as That is probably the least fussy option if the browser-native appearance is acceptable. The picker UI varies by browser/OS and is not deeply styleable; only reach for a component library if you need a uniform custom calendar, range selection, or explicit time-zone selection. References: Svelte |
|
svelty-picker Bootstrap style datepicker + timepicker, works standalone. Svelte 4/5 compatible.
|
Uh oh!
There was an error while loading. Please reload this page.
Is there a normal, no-frills, no-fuss date-time picker that can be used in normal applications?
All reactions