MyGit

t1m0n/air-datepicker

Fork: 1367 Star: 2654 (更新于 2024-11-09 12:46:06)

license: MIT

Language: JavaScript .

Lightweight, dependency-free JavaScript datepicker.

最后发布版本: v3.5.3 ( 2024-05-27 03:56:43)

官方网址 GitHub网址

Air Datepicker

Lightweight, dependency-free, fast, customizable datepicker written in pure JavaScript. Works in all modern browsers which supports native css variables.

air datepicker image

Install

npm i air-datepicker

Usage

import AirDatepicker from 'air-datepicker'
import 'air-datepicker/air-datepicker.css'

new AirDatepicker('#el' [, options]);

Demo and docs

Recent updates

v3.5.3

  • fixed range mode #613

v3.5.2

  • fixed range mode #613

v3.5.1

  • improved destroy() behavior - added isDestroyed property, opts and selectedDates will still have empty values, instead of null, even after AirDatepicker has been destroyed #600

v3.5.0

  • added fixedHeight option, allows you to have equal weeks number in every month
  • added method disableDate, allows you to disabled one or multiple dates with datepicker API
  • added prop disabledDates - it is a Set which holds all disabled dates
  • added possibility to pass {silent: true} to update and setCurrentView methods, #583
  • changed update method - now if you pass selectedDates then calendar will keep selected only those dates
  • fixed selecting time on same date when range: true, #568
  • fixed date conversion to local date when using strings, e.g selectDate('2024-03-05') #589
  • fixed localization generation, thanks to hreyeslo in #524
  • fixed type definition for clear method, thanks to ahmetzambak in #591
  • fixed German translation for "clear", thanks to pbek in #582
  • added Slovenian locale, thanks to carliblaz in #569
  • added Basque locale, thanks to ikerib in #529
  • added Norwegian locale, thanks to MortenSpjotvoll in #521

v3.4.0

  • added new options onFocus and onBeforeSelect grant you more control over range selection behaviour and more #526
  • added new method getViewDates() allows you to get all dates that should be currently displayed in calendar #536
  • toggleSelected now can be a function #534
  • fixed clear method #546
  • added Bulgarian locale, thanks to tonytomov, in #531
  • added Catalan locale, thanks to joatb, in #542
  • added Croatian Locale, thanks to diomed, in #551

v3.3.5

  • added handling of optional chaining operator in dist package #518
  • added Indonesian locale, thanks to BariqDharmawan, in #517

Version 3.0.0 highlights

It is been a while since the last release, a lot of work has been done, and I'm glad to finally present a new version of Air Datepicker.

The main goal was to remove jQuery dependency, and I'm happy to announce that Air Datepicker is no longer need any dependency, hurray! :partying_face:

Now it's written in ES6, uses native css variables for easy customization, and it's all built with webpack.

Soooo, here is the full list of changes:

  • no more jQuery
  • improve rendering process - remove redundant cell render when selecting date, which gave a large speed boost compared to the old version
  • date format tokens now use Unicode Technical Standard
  • TypeScript support
  • added selectedDates option, to be able to select dates from the start
  • added a possibility to create custom buttons
  • now one could change selected range by dragging dates
  • added container option which allows you to place datepicker in a custom element
  • navTitles can receive a function and could render dynamically
  • dateFormat now can receive a function
  • onSelect and onRenderCell callbacks are now receive a single object as an argument instead of multiple parameters
  • selectDate now receives second parameter with options
  • onChangeMonth, onChangeYear, onChangeDecades are replaced with single option onChangeViewDate
  • localization now must be provided as an object instead of string as it was before

Contribution

  • To run project run npm i, then npm run dev:serve.
  • If you want to report a bug, please provide steps and code to reproduce it or create a live example. You could use this template for creating sandbox
  • If you have a question please ask it on StackOverflow with tag air-datepicker
  • If you have a proposal or PR please submit it to the main branch - please follow code style according to .eslint configuration. Also make sure that your effort is aligned with project roadmap - my goal is to keep datepicker clean and lightweight (under 15kb) without overcomplications or narrowly focused features

Thank you! :blush:

License

Air Datepicker is MIT licensed.

最近版本更新:(数据更新于 2024-09-12 11:02:03)

2024-05-27 03:56:43 v3.5.3

2024-05-27 03:56:26 v3.5.2

2024-05-27 03:55:52 v3.5.1

2024-03-06 05:17:31 v3.5.0

2023-07-25 05:32:58 v3.4.0

2023-05-05 23:13:46 v3.3.5

主题(topics):

calendar, datepicker, javascript, timepicker

t1m0n/air-datepicker同语言 JavaScript最近更新仓库

2024-11-24 01:32:20 Number178/kikoeru-express

2024-11-23 05:56:23 pedroslopez/whatsapp-web.js

2024-11-22 22:33:12 ZeroRing233/Degrees-of-Lewdity-RobinMod

2024-11-22 16:46:00 meshery/meshery

2024-11-21 23:03:24 bia-pain-bache/BPB-Worker-Panel

2024-11-21 22:46:48 MHSanaei/3x-ui