stimulus-calendar
v1.2.3
Published
A Stimulus controller to allow date and time input.
Downloads
7
Maintainers
Readme
Stimulus Calendar
Date and time input stimulus controller.
Demo
Installation
yarn add stimulus-calendar
npm install stimulus-calendar
Usage
// bootstrap.js
import {Application} from '@hotwired/stimulus'
import Calendar from 'src/stimulus-calendar'
const app = Application.start()
app.register('calendar', Calendar)
<div data-controller="calendar" data-calendar-is-disabled-value="false">
<input type="text" data-calendar-target="dateInput" value="{{ post.date|format_datetime() }}"/>
</div>
Config
data-calendar-is-disabled-value="true"
- disables the input to select a year, month, day, hour and minute.
Themes
data-calendar-theme-value="dark"
data-calendar-theme-value="light"
data-calendar-theme-value="default"
(crazy, but this one is default)