Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oz_dev/svelty-picker

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oz_dev/svelty-picker

Sweet date/time picker written in svelte

  • 5.3.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

📆 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

FAQs

Package last updated on 08 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc