2.0.1 • Published 7 months ago

alvins-time-picker v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Alvin's Time Picker

A lightweight, customizable datetime picker component with no dependencies.

Features

  • Pure JavaScript with no dependencies
  • Customizable min/max dates
  • 12-hour time format with AM/PM
  • Month/Year selection
  • Mobile-friendly design
  • Customizable styling
  • Event callbacks
  • Range picker support

Installation

bash npm install alvins-time-picker

Usage

javascript import DateTimePicker from 'alvins-time-picker'; const picker = new DateTimePicker({ minDate: new Date(), onConfirm: (date) => console.log(date) }); picker.attach(document.querySelector('#datetime-input'));

Options

OptionTypeDefaultDescription
minDateDatenew Date()Minimum selectable date
maxDateDatenullMaximum selectable date
onConfirmFunctionnullCallback when date is confirmed
isRangePickerBooleanfalseEnable range picker mode
rangeStartDatenullStart date for range
rangeEndDatenullEnd date for range
linkedPickerDateTimePickernullLinked picker for range selection

License

MIT

2.0.1

7 months ago

2.0.0

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago