Replace pickadate with flatpickr so we can also pick time

This commit is contained in:
Kevin MacMartin 2019-07-17 01:11:09 -04:00
parent 7e629af810
commit 6237b500ff
5 changed files with 11 additions and 20 deletions

View file

@ -54,7 +54,7 @@ class Dashboard
[ 'name' => 'GreenSock', 'url' => 'https://greensock.com/gsap' ],
[ 'name' => 'jQuery', 'url' => 'https://jquery.org' ],
[ 'name' => 'List.js', 'url' => 'http://listjs.com' ],
[ 'name' => 'pickadate.js', 'url' => 'http://amsul.ca/pickadate.js/' ],
[ 'name' => 'flatpickr', 'url' => 'https://flatpickr.js.org' ],
[ 'name' => 'Popper.js', 'url' => 'https://popper.js.org' ],
[ 'name' => 'SimpleMDE Markdown Editor', 'url' => 'https://simplemde.com' ],
[ 'name' => 'Sortable', 'url' => 'https://github.com/RubaXa/Sortable' ],

6
gulpfile.js vendored
View file

@ -61,8 +61,7 @@ const jsDashboardLibs = [
"node_modules/jquery/dist/jquery.js",
"node_modules/popper.js/dist/umd/popper.js",
"node_modules/bootstrap/dist/js/bootstrap.js",
"node_modules/pickadate/lib/picker.js",
"node_modules/pickadate/lib/picker.date.js",
"node_modules/flatpickr/dist/flatpickr.js",
"bower_components/Sortable/Sortable.js",
"bower_components/list.js/dist/list.js",
"bower_components/simplemde/dist/simplemde.min.js"
@ -70,8 +69,7 @@ const jsDashboardLibs = [
// CSS libraries for the dashboard
const cssDashboardLibs = [
"node_modules/pickadate/lib/themes/default.css",
"node_modules/pickadate/lib/themes/default.date.css",
"node_modules/flatpickr/dist/flatpickr.css",
"bower_components/simplemde/dist/simplemde.min.css",
"bower_components/SpinKit/css/spinners/11-folding-cube.css"
];

13
package-lock.json generated
View file

@ -3254,6 +3254,11 @@
"resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
"integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q=="
},
"flatpickr": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.2.tgz",
"integrity": "sha512-bRfBPyxohUQWgCTg6jPALUO1t/x+sRJ/S/RVti/NzYvHqGRpCAesKSWKLzOuLmpu+vGHfXBld4SXvOCLFgYb+g=="
},
"flush-write-stream": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz",
@ -6160,14 +6165,6 @@
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"pickadate": {
"version": "3.6.3",
"resolved": "https://registry.npmjs.org/pickadate/-/pickadate-3.6.3.tgz",
"integrity": "sha512-UbYH4HptW6Mv4SHr/RaQLaHaawFU1HZD3jtS+uted+0bdUGzV5qUakUAZi+r5NTbnplJBqpOEg2MBg9IKcWPuQ==",
"requires": {
"jquery": ">=1.7"
}
},
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",

View file

@ -15,6 +15,7 @@
"bootstrap": "4.3.1",
"browserify": "^16.2.3",
"fancy-log": "^1.3.3",
"flatpickr": "^4.6.2",
"gsap": "^2.1.2",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
@ -28,7 +29,6 @@
"gulp-uglify": "^3.0.2",
"jquery": "^3.4.1",
"minimist": "^1.2.0",
"pickadate": "^3.6.3",
"popper.js": "^1.15.0",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0",

View file

@ -556,12 +556,8 @@ function editItemInit() {
// enable the datepicker for each element with the date-picker class
$datePickers.each(function() {
$(this).pickadate({
format: "yyyy-mm-dd",
formatSubmit: "yyyy-mm-dd",
clear: false,
selectYears: true,
selectMonths: true
$(this).flatpickr({
enableTime: true
});
});