0.2.1 • Published 4 years ago

mmd-persian-datepicker v0.2.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

still in development

mmd-persian-datepicker

mmd-persian-datepicker

A pure js persian datepicker, powered by TypeScript :)

how to test

you have to installed NodeJS v8 up and recommended install Yarn.

- git clone https://github.com/mammad2c/mmd-persian-datepicker
- yarn or npm i
- yarn start or npm start
- open `example/index.html` at your browser

Dependencies:

Todo:

  • writing tests.
  • modular codes.

Configs:

  • defaultValue: initial value, should be today by default on initial render.
  • numberOfMonths: how many months should be rendered.
  • mode: single or range.
  • disabledDates: disable only some dates.
  • enabledDates: disable whole picker's dates except these dates.
  • inline: render picker like a normal calendar.
  • maxDate: maximum date user can select.
  • minDate: minimum date user can select.
  • monthChanger: enable selecting from months, also by set false could disable it.
  • yearChanger: enable selecting from years, also by set false could disable it.
  • altInput: alt input for actual sending data to server.
  • altFormat: date formats for altInput.
  • readonly: input could not editable directly. only changes by picker.
  • clearButton: render a button to clear selected date(s), useful when multiple is true.
  • todayButton: go to today on picker.
  • firstDayOfWeek: weeks start days. for example on jalali is saturday and on georgian is monday. should be configurable.

Events:

  • onBeforeOpen: the event fires before datepicker open.
  • onBeforeClose: the event fires before datepicker close.
  • onAfterMonthChange: the event fires after changing the month.
  • onAfterYearChange: the event fires after changing the year.
  • onDayCreate: handle rendering date creates. adding custom element to day items and ... .

Methods:

  • destroy: destroy instance, remove addEventListeners and ... for nothing exists about the picker. this feature enable using this library in SPA frameworks such as react, vue and ... .
  • jumpToDate: move picker to specific date.
  • setDate: set picker selected date(s) programmatically.
  • toggle: toggle between open and close of picker.
0.2.1

4 years ago

0.2.0

4 years ago

0.1.107

5 years ago

0.1.106

5 years ago

0.1.105

5 years ago

0.1.104

5 years ago

0.1.103

5 years ago

0.1.102

5 years ago

0.1.101

5 years ago

0.1.100

5 years ago

0.1.98

5 years ago

0.1.99

5 years ago

0.1.97

5 years ago

0.1.96

5 years ago

0.1.92

5 years ago

0.1.93

5 years ago

0.1.94

5 years ago

0.1.95

5 years ago

0.1.91

5 years ago

0.1.77

5 years ago

0.1.76

5 years ago

0.1.75

5 years ago

0.1.74

5 years ago

0.1.73

5 years ago

0.1.71

5 years ago

0.1.72

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.41

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago