stimulus-calendar

1.2.3 • Public • Published

Stimulus Calendar

Date and time input stimulus controller.

Demo

Stimulus Calendar 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)

Package Sidebar

Install

npm i stimulus-calendar

Weekly Downloads

2

Version

1.2.3

License

MIT

Unpacked Size

134 kB

Total Files

16

Last publish

Collaborators

  • kez