5.2.9 • Published 1 year ago

svelty-picker v5.2.9

Weekly downloads
-
License
-
Repository
-
Last release
1 year 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.9

1 year ago

5.2.8

1 year ago

5.2.7

1 year ago

5.2.6

1 year ago

5.2.5

1 year ago

5.2.4

1 year ago

5.2.3

1 year ago

5.2.2

1 year ago

5.2.1

1 year ago

5.1.1

2 years ago

5.1.0

2 years ago

5.2.0

2 years ago

3.6.1

2 years ago

3.6.0

2 years ago

4.0.5

2 years ago

4.0.4

2 years ago

4.0.7

2 years ago

4.0.6

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.0.3

2 years ago

4.0.2

2 years ago

5.0.0

2 years ago

4.0.9

2 years ago

4.0.8

2 years ago

3.5.3

2 years ago

3.5.2

2 years ago

3.5.1

2 years ago

4.0.0-beta.1

2 years ago

4.1.4

2 years ago

4.1.3

2 years ago

4.1.0

2 years ago

4.1.2

2 years ago

4.1.1

2 years ago

4.0.0-alpha.5

2 years ago

4.0.0-alpha.3

2 years ago

4.0.0-alpha.4

2 years ago

3.4.6

2 years ago

4.0.0-alpha.1

2 years ago

3.4.5

2 years ago

4.0.0-alpha.2

2 years ago

3.4.0

2 years ago

3.3.0

2 years ago

3.4.4

2 years ago

3.4.3

2 years ago

3.4.2

2 years ago

3.5.0

2 years ago

3.4.1

2 years ago

3.2.3

3 years ago

3.2.2

3 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.1.1

3 years ago

3.1.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.0.2

3 years ago

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.5

3 years ago

1.3.0

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

1.0.0

4 years ago