[READ-ONLY] Mirror of https://github.com/probablykasper/date-picker-svelte. Date and time picker for Svelte date-picker-svelte.kasper.space
calendar date date-picker date-time-picker datepicker package svelte time
0

Configure Feed

Select the types of activity you want to include in your feed.

Add `required` property (#74)

authored by

Giovanni Guarino and committed by
GitHub
(Nov 15, 2023, 4:52 AM +0100) c8f879fa 7f6b40f2

+10
+3
CHANGELOG.md
··· 1 1 # Changelog 2 2 3 + ## Next 4 + - Add `required` prop (@ChromuSx) 5 + 3 6 ## 2.9.0 - 2023 Nov 3 4 7 - Add `timePrecision` prop for showing a time picker (@nihanmubashshir) 5 8
+3
src/lib/DateInput.svelte
··· 48 48 export let valid = true 49 49 /** Disable the input **/ 50 50 export let disabled = false 51 + /** Require a value to submit form **/ 52 + export let required = false 51 53 /** Pass custom classes */ 52 54 let classes = '' 53 55 export { classes as class } ··· 189 191 value={text} 190 192 {placeholder} 191 193 {disabled} 194 + {required} 192 195 on:focus={() => (visible = true)} 193 196 on:mousedown={() => (visible = true)} 194 197 on:input={(e) => {
+3
src/routes/DateInput.svelte
··· 10 10 let valid: boolean 11 11 let visible: boolean 12 12 let disabled: boolean 13 + let required: boolean 13 14 let closeOnSelection: boolean 14 15 let browseWithoutSelecting: boolean 15 16 let format: string ··· 28 29 bind:format 29 30 bind:visible 30 31 bind:disabled 32 + bind:required 31 33 bind:closeOnSelection 32 34 bind:browseWithoutSelecting 33 35 bind:dynamicPositioning ··· 44 46 <Prop label="format" bind:value={format} /> 45 47 <Prop label="visible" bind:value={visible} /> 46 48 <Prop label="disabled" bind:value={disabled} /> 49 + <Prop label="required" bind:value={required} /> 47 50 <Prop label="closeOnSelection" bind:value={closeOnSelection} /> 48 51 <Prop label="browseWithoutSelecting" bind:value={browseWithoutSelecting} /> 49 52 <Prop label="dynamicPositioning" bind:value={dynamicPositioning} />
+1
src/routes/docs/+page.md
··· 40 40 | `format` | string | Format string | 41 41 | `visible` | bool | Whether the date popup is visible | 42 42 | `disabled` | bool | Disable the input | 43 + | `required` | bool | Require a value to submit form | 43 44 | `closeOnSelection` | bool | Close the date popup when a date is selected | 44 45 | `browseWithoutSelecting` | bool | Wait with updating the date until a value is selected | 45 46 | `dynamicPositioning` | bool | Dynamicly postions the date popup to best fit on the screen |