JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11631
  • Score
    100M100P100Q138831F
  • License GPL-2.0-or-later

Plugin for easepick.

Package Exports

  • @easepick/range-plugin
  • @easepick/range-plugin/dist/index.esm.js
  • @easepick/range-plugin/dist/index.umd.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@easepick/range-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@easepick/range-plugin

npm version

This package does not need to be installed if you are using @easepick/bundle.

Adds the ability to select a range of dates.

Documentation

https://easepick.com/packages/range-plugin

Options

Name Type Default Description
elementEnd HTMLElement
string
null Bind the datepicker to a element for end date.
startDate Date
string
number
null Preselect start date.
Date Object or Unix Timestamp (with milliseconds) or String (must be equal to option format).
endDate Date
string
number
null Preselect end date.
Date Object or Unix Timestamp (with milliseconds) or String (must be equal to option format).
repick boolean false If date range is already selected, then user can change only one of start date or end date (depends on clicked field) instead of new date range.
strict boolean true Disabling the option allows you to select an incomplete range.
delimiter string ' - ' Delimiter between dates.
tooltip boolean true Showing tooltip with how much days will be selected.
tooltipNumber function Handling the tooltip number.
locale object { one: 'day', other: 'days' } Text for the tooltip.
Keys depends on option lang (see Intl.PluralRules).

Methods

Name Description
setDateRange(start, end) Set date range. Should be Date Object or Unix Timestamp (with milliseconds) or String (must be equal to option format).
setStartDate(date) Set start of date range. Should be Date Object or Unix Timestamp (with milliseconds) or String (must be equal to option format).
setEndDate(date) Set end of date range. Should be Date Object or Unix Timestamp (with milliseconds) or String (must be equal to option format).
getStartDate() Return current start of date range as DateTime Object.
getEndDate() Return current end of date range as DateTime Object.