README.md in flatpickr-4.5.2.0 vs README.md in flatpickr-4.5.2.1
- old
+ new
@@ -1,10 +1,10 @@
# flatpickr
[![Gem Version](https://badge.fury.io/rb/flatpickr.svg)](https://badge.fury.io/rb/flatpickr)
-[Flatpickr](https://github.com/chmln/flatpickr) is a lightweight and powerful datetimepicker with no dependencies. This gem packages flatpickr's assets for drop-in use in Rails applications.
+[Flatpickr](https://github.com/flatpickr/flatpickr) is a lightweight and powerful datetimepicker with no dependencies. This gem packages flatpickr's assets for drop-in use in Rails applications.
## Installation
Add this line to your application's Gemfile:
@@ -29,18 +29,14 @@
And in your application.js:
```js
//= require flatpickr
-//
-// Locales can be included as well:
-//= require flatpickr/l10n/da
-flatpickr('.your-selector');
-
-// if using jQuery
-// $('.your-selector').flatpickr();
+document.addEventListener('DOMContentLoaded', function() {
+ flatpickr('.your-selector');
+})
```
#### Using Plugins
Flatpickr provides plugins which expand the library's functionality. To include the `confirmDate` plugin, for example, you must require the necessary assets and specify the plugin during initialization:
@@ -54,18 +50,20 @@
In application.js:
```js
//= require flatpickr
//= require flatpickr/plugins/confirmDate/confirmDate
-flatpickr('.your-selector', {
- enableTime: true,
- plugins: [
- new confirmDatePlugin({})
- ]
+document.addEventListener('DOMContentLoaded', function() {
+ flatpickr('.your-selector', {
+ enableTime: true,
+ plugins: [
+ new confirmDatePlugin({})
+ ]
+ })
})
```
-See [flatpickr's docs](https://chmln.github.io/flatpickr/) for configuration and usage info.
+See [flatpickr's official docs](https://flatpickr.js.org/) for more configuration and usage details.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).