npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

stimulus-easepick

v0.5.0

Published

A Stimulus Wrapper for easepick datepicker library

Downloads

82

Readme

Stimulus Easepick Datepicker

npm version

Getting started

Experience the power of simplicity with our lightweight, zero-dependency datepicker powered by easepick. This Stimulus controller wrapper brings you:

  • Seamless integration with Stimulus
  • Minimal footprint for optimal performance
  • Rich functionality without the bloat

Transform date input fields into intuitive, user-friendly datepickers with minimal effort.

Installation

Ensure you have the following dependencies installed in your project:

  • @hotwired/stimulus v3 or later
  • @easepick/bundle v1.2 or later

Integrate stimulus-easepick into your project:

npm install stimulus-easepick
# yarn add stimulus-easepick

Register the datepicker controller with your Stimulus application:

// app/javascript/controllers/index.js
import { Application } from "@hotwired/stimulus";
import Datepicker from "stimulus-easepick";

const application = Application.start();
application.register("datepicker", Datepicker);

Usage

<div data-controller="datepicker" data-datepicker-format-value="D MMM YYYY">
  <input data-datepicker-target="input" />
</div>

Configuration

| Attribute | Default | Type | Description | |---|---|---|---| | data-datepicker-first-day-value | 1 | Number | Day of start week. (0 - Sunday, 1 - Monday, etc…) | | data-datepicker-lang-value | en-US | String | Language. This option affect to day names, month names via Date.prototype.toLocaleString() and also affect to plural rules via Intl.PluralRules. | | data-datepicker-date-value | | String, Number | Unix Timestamp (with milliseconds) or String (must satisfy the option format). | | data-datepicker-format-value | YYYY-MM-DD | String | The default output format. See tokens format. | | data-datepicker-grid-value | 1 | Number | Number of calendar columns. | | data-datepicker-calendars-value | 1 | Number | Number of visible months. | | data-datepicker-readonly-value | false | Boolean | Add readonly attribute to element. | | data-datepicker-inline-value | false | Boolean | Show calendar inline. | | data-datepicker-lock-min-date-value | | String, Number | Lock Plugin. The minimum date that can be selected. Unix Timestamp (with milliseconds) or String (must satisfy the option format). | | data-datepicker-lock-max-date-value | | String, Number | Lock Plugin. The maximum date that can be selected. Unix Timestamp (with milliseconds) or String (must satisfy the option format). | | data-datepicker-enable-time-value | false | Boolean | Enable Time Plugin. | | data-datepicker-time-seconds-value | false | Boolean | Enable seconds picker. | | data-datepicker-time-step-hours-value | 1 | Number | Step for hours. | | data-datepicker-time-step-minutes-value | 5 | Number | Step for minutes. | | data-datepicker-time-step-seconds-value | 5 | Number | Step for seconds. | | data-datepicker-time-twelve-format-value | false | Boolean | Display 12H time. | | data-datepicker-enable-amp-value | false | Boolean | Enable Amp Plugin. | | data-datepicker-amp-reset-button-value | false | Boolean | Adds a reset button to clear the current selection. | | data-datepicker-amp-months-value | false | Boolean | Enable the months dropdown in the calendar. | | data-datepicker-amp-years-value | false | Boolean | Enable the years dropdown in the calendar. | | data-datepicker-amp-min-year-value | 1950 | Number | The minimum year that can be selected in the dropdown. | | data-datepicker-amp-max-year-value | null | Number | The maximum year that can be selected in the dropdown. | | data-datepicker-enable-range-value | false | Boolean | Enable Range Plugin. | | data-datepicker-range-delimiter-value | - | String | Delimiter between dates. | | data-datepicker-range-tooltip-value | true | Boolean | Showing tooltip with how many days will be selected. | | data-datepicker-range-start-date-value | null | String, Number | Preselect start date. Unix Timestamp (with milliseconds) or String (must satisfy the option format). | | data-datepicker-range-end-date-value | null | String, Number | Preselect end date. Unix Timestamp (with milliseconds) or String (must satisfy the option format). | | data-datepicker-enable-preset-value | false | Boolean | Enable Preset Plugin. Range plugin must be enabled. | | data-datepicker-preset-position-value | left | String | Position of preset block (left, right, top, or bottom). |

Contributing

Do not hesitate to contribute to the project by adapting or adding features! Bug reports or pull requests are welcome.

Don't forget to drop a 🌟 on GitHub to support the project.

License

This project is released under the MIT license.