5.2.7 • Published 17 hours ago

svelty-picker v5.2.7

Weekly downloads
-
License
-
Repository
-
Last release
17 hours ago

📆 Svelty Picker NPM version

Simple date & time picker implemented in svelte.

Features:

  • date/time/datetime/range picker mode
  • various formatting options
  • keyboard navigation
  • replacable slots
  • themable
  • customizable disabled dates
  • custom element

⚙️ Install

npm install svelty-picker

Property list

PropertyTypeDefaultDescription
inputIdstring""id attribute for input element
namestring'date'html attribute for underlying <input> element
disabledboolfalsehtml attribute for underlying <input> element
placeholderstringnullhtml attribute for underlying <input> element
requiredboolfalsehtml attribute for underlying <input> element
valuestringnullstring representation of selected value
initialDateDatenullinitial date object, if you prefer that to value
isRangeboolfalseenables range picker mode
startDatestring|Datenulllimit minimal selectable date
endDatestring|Datenulllimit maximal selectable date
pickerOnlyboolfalsePicker is always visible and input field is then hidden, but still present
startViewnumber2Which mode should picker at, 0 - decade, 1 - year, 2 - month (default), 3 - time picker
modestringautorestrict picker's mode. Possible values: auto\|date\|datetime\|time. By default it try to guess the mode from format
disableDatesFnfunctionnullFunction whether passed date should be disabled or not
manualInputboolfalseWhether manual date entry is allowed
formatstring'yyyy-mm-dd'Format of entered date/time.
formatTypestring'standard'Format type (standard or php)
displayFormatstringnullDisplay format of entered date/time.
displayFormatTypestringnullDisplay format type (standard or php)
minuteIncrementnumber1number in range 1-60 to set the increment of minutes choosable
weekStartnumber1number in range 0-6 to select first day of the week. Sunday is 0
inputClassesstring""input css class string
todayBtnClassesstring'sdt-action-btn sdt-today-btn'today button css classes
clearBtnClassesstring'sdt-action-btn sdt-clear-btn'clear button css classes
todayBtnbooltrueShow today button
clearBtnbooltrueShow clear button
clearTogglebooltrueAllows to clear selected date when clicking on the same date when in mode='date' or mode='auto' resolving to 'date'
autocommitbooltrueWhether date/time selection is automatic or manual
i18nobjectenlocalization object, english is by default
validatorActionarraynullBind validator action for inner <input> element. Designed to be used with svelte-use-form.
positionResolverfunctioninternalAction which resolves floating position of picker. Default one uses @floating-ui under the hood. So you can use this library for your custom position resolver function

Documentation

For more details check the documentation

🏆 Thanks to:

Licence

MIT

5.2.7

17 hours ago

5.2.6

2 months ago

5.2.5

2 months ago

5.2.4

3 months ago

5.2.3

3 months ago

5.2.2

3 months ago

5.2.1

4 months ago

5.1.1

6 months ago

5.1.0

7 months ago

5.2.0

6 months ago

3.6.1

10 months ago

3.6.0

10 months ago

4.0.5

10 months ago

4.0.4

10 months ago

4.0.7

10 months ago

4.0.6

10 months ago

4.0.1

10 months ago

4.0.0

10 months ago

4.0.3

10 months ago

4.0.2

10 months ago

5.0.0

7 months ago

4.0.9

9 months ago

4.0.8

10 months ago

3.5.3

10 months ago

3.5.2

11 months ago

3.5.1

11 months ago

4.0.0-beta.1

10 months ago

4.1.4

8 months ago

4.1.3

8 months ago

4.1.0

9 months ago

4.1.2

9 months ago

4.1.1

9 months ago

4.0.0-alpha.5

1 year ago

4.0.0-alpha.3

1 year ago

4.0.0-alpha.4

1 year ago

3.4.6

1 year ago

4.0.0-alpha.1

1 year ago

3.4.5

1 year ago

4.0.0-alpha.2

1 year ago

3.4.0

1 year ago

3.3.0

1 year ago

3.4.4

1 year ago

3.4.3

1 year ago

3.4.2

1 year ago

3.5.0

1 year ago

3.4.1

1 year ago

3.2.3

2 years ago

3.2.2

2 years ago

3.2.1

2 years ago

3.2.0

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.0.2

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.5

2 years ago

1.3.0

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago

1.0.0

3 years ago