diff --git a/public/javascripts/jquery-timepicker-addon/.jshintrc b/public/javascripts/jquery-timepicker-addon/.jshintrc new file mode 100644 index 0000000..54c84f1 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/.jshintrc @@ -0,0 +1,15 @@ +{ + "curly": true, + "eqeqeq": true, + "immed": true, + "latedef": true, + "newcap": true, + "noarg": true, + "sub": true, + "undef": true, + "unused": true, + "boss": true, + "eqnull": true, + "node": true, + "es5": true +} diff --git a/public/javascripts/jquery-timepicker-addon/CONTRIBUTING.md b/public/javascripts/jquery-timepicker-addon/CONTRIBUTING.md new file mode 100644 index 0000000..260644f --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing + +## Important notes +Please don't edit files in the `dist` subdirectory as they are generated via Grunt. You'll find source code in the `src` subdirectory! + +### Code style +Regarding code style like indentation and whitespace, **follow the conventions you see used in the source already (tabs).** + +### PhantomJS +While Grunt can run the included unit tests via [PhantomJS](http://phantomjs.org/), this shouldn't be considered a substitute for the real thing. Please be sure to test the `test/*.html` unit test file(s) in _actual_ browsers. + +## Modifying the code +First, ensure that you have the latest [Node.js](http://nodejs.org/) and [npm](http://npmjs.org/) installed. + +Test that Grunt's CLI is installed by running `grunt --version`. If the command isn't found, run `npm install -g grunt-cli`. For more information about installing Grunt, see the [getting started guide](http://gruntjs.com/getting-started). + +1. Fork and clone the repo. +1. Run `npm install` to install all dependencies (including Grunt). +1. Run `grunt` to grunt this project. + +Assuming that you don't see any red, you're ready to go. Just be sure to run `grunt` after making any changes, to ensure that nothing is broken. + +## Submitting pull requests + +1. Create a new branch, please don't work in your `master` branch directly. Please pull from the `dev` branch. +1. Add failing tests for the change you want to make. Run `grunt` to see the tests fail. +1. Fix stuff. +1. Run `grunt` to see if the tests pass. Repeat steps 2-4 until done. +1. Open `test/*.html` unit test file(s) in actual browser to ensure tests pass everywhere. +1. Update the documentation to reflect any changes. +1. Push to your fork and submit a pull request (back to the `dev` branch). diff --git a/public/javascripts/jquery-timepicker-addon/Gruntfile.js b/public/javascripts/jquery-timepicker-addon/Gruntfile.js new file mode 100644 index 0000000..9b69bf7 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/Gruntfile.js @@ -0,0 +1,147 @@ +'use strict'; + +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + // Metadata. + pkg: grunt.file.readJSON('jquery-ui-timepicker-addon.json'), + banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + + //'<%= grunt.template.today("yyyy-mm-dd") %>\n' + + '<%= pkg.modified %>\n' + + '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + + '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + + ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n', + // Task configuration. + clean: { + files: ['dist'] + }, + copy: { + dist: { + files: [ + //{ src: 'src/index.html', dest: 'dist/index.html' }, + { src: 'src/<%= pkg.name %>.css', dest: 'dist/<%= pkg.name %>.css' }, + { src: 'src/jquery-ui-sliderAccess.js', dest: 'dist/jquery-ui-sliderAccess.js' }, + { src: 'src/i18n/jquery-ui-timepicker-*.js', dest: 'dist/i18n/', expand:true, flatten: true } + ] + } + }, + concat: { + dist: { + options: { + banner: '<%= banner %>', + stripBanners: true + }, + src: ['src/<%= pkg.name %>.js'], + dest: 'dist/<%= pkg.name %>.js' + }, + docs: { + src: [ + 'src/docs/header.html', + 'src/docs/intro.html', + 'src/docs/options.html', + 'src/docs/formatting.html', + 'src/docs/i18n.html', + 'src/docs/examples.html', + 'src/docs/footer.html' + ], + dest: 'dist/index.html' + } + }, + uglify: { + options: { + banner: '<%= banner %>' + }, + dist: { + src: '<%= concat.dist.dest %>', + dest: 'dist/<%= pkg.name %>.min.js' + } + }, + cssmin: { + options: { + banner: '<%= banner %>' + }, + dist: { + src: 'dist/<%= pkg.name %>.css', + dest: 'dist/<%= pkg.name %>.min.css' + } + }, + replace: { + dist: { + options: { + variables: { + version: '<%= pkg.version %>', + timestamp: '<%= pkg.modified %>' + }, + prefix: '@@' + }, + files: [ + { src: 'dist/<%= pkg.name %>.js', dest: 'dist/<%= pkg.name %>.js' }, + { src: 'dist/<%= pkg.name %>.css', dest: 'dist/<%= pkg.name %>.css' }, + { src: 'dist/index.html', dest: 'dist/index.html' } + ] + } + }, + jasmine: { + src: 'src/<%= pkg.name %>.js', + options: { + specs: 'test/*_spec.js', + vendor: [ + 'http://code.jquery.com/jquery-1.10.1.min.js', + 'http://code.jquery.com/ui/1.10.3/jquery-ui.min.js', + 'http://github.com/searls/jasmine-fixture/releases/1.0.5/1737/jasmine-fixture.js' + ] + } + }, + jshint: { + gruntfile: { + options: { + jshintrc: '.jshintrc' + }, + src: 'Gruntfile.js' + }, + src: { + options: { + jshintrc: 'src/.jshintrc' + }, + src: ['src/**/*.js'] + }, + test: { + options: { + jshintrc: 'test/.jshintrc' + }, + src: ['test/**/*.js'] + } + }, + watch: { + gruntfile: { + files: '<%= jshint.gruntfile.src %>', + tasks: ['jshint:gruntfile'] + }, + src: { + files: 'src/**',//'<%= jshint.src.src %>', + tasks: ['jshint:src', 'jasmine', 'clean', 'copy', 'concat', 'replace', 'uglify', 'cssmin'] + //tasks: ['jshint:src', 'jasmine'] + }, + test: { + files: '<%= jshint.test.src %>', + tasks: ['jshint:test', 'jasmine'] + } + } + }); + + // These plugins provide necessary tasks. + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-replace'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-contrib-jasmine'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-watch'); + + // Default task. + grunt.registerTask('default', ['jshint', 'jasmine', 'clean', 'copy', 'concat', 'replace', 'uglify', 'cssmin']); + +}; diff --git a/public/javascripts/jquery-timepicker-addon/LICENSE-MIT b/public/javascripts/jquery-timepicker-addon/LICENSE-MIT new file mode 100644 index 0000000..957a11c --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2013 Trent Richardson + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/public/javascripts/jquery-timepicker-addon/README.md b/public/javascripts/jquery-timepicker-addon/README.md new file mode 100644 index 0000000..7e9adac --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/README.md @@ -0,0 +1,27 @@ +jQuery Timepicker Addon +======================= + +About +----- +- Author: [Trent Richardson](http://trentrichardson.com) +- Documentation: [http://trentrichardson.com/examples/timepicker/](http://trentrichardson.com/examples/timepicker/) +- Twitter: [@practicalweb](http://twitter.com/practicalweb) + +Use +--- +I recommend getting the eBook [Handling Time](https://sellfy.com/p/8gxZ) as it has a lot of example code to get started. The quick and dirty: + +- To use this plugin you must include jQuery (1.6+) and jQuery UI with datepicker (and optionally slider). +- Include timepicker-addon script located in the `dist` directory. +- now use timepicker with `$('#selector').datetimepicker()` or `$('#selector').timepicker()`. + +There is also a [Bower](http://bower.io/) package named `jqueryui-timepicker-addon`. Beware there are other similar package names that point to forks which may not be current. + +Contributing Code - Please Read! +-------------------------------- +- All code contributions and bug reports are much appreciated. +- Please be sure to apply your fixes to the "dev" branch. +- Also note tabs are appreciated over spaces. +- Please read the [CONTRIBUTING.md][contributingmd] for more on using Grunt to produce builds. + +[contributingmd]: CONTRIBUTING.md \ No newline at end of file diff --git a/public/javascripts/jquery-timepicker-addon/bower.json b/public/javascripts/jquery-timepicker-addon/bower.json new file mode 100644 index 0000000..a01f49f --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/bower.json @@ -0,0 +1,11 @@ +{ + "name": "jqueryui-timepicker-addon", + "version": "1.4.4", + "repository": { + "type": "git", + "url": "git://github.com/trentrichardson/jQuery-Timepicker-Addon.git" + }, + "dependencies": { + "jquery-ui": "~1.9.2" + } +} \ No newline at end of file diff --git a/public/javascripts/jquery-timepicker-addon/composer.json b/public/javascripts/jquery-timepicker-addon/composer.json new file mode 100644 index 0000000..150661e --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/composer.json @@ -0,0 +1,26 @@ +{ + "name": "trentrichardson/jquery-timepicker-addon", + "description": "Adds a timepicker to jQueryUI Datepicker.", + "type": "component", + "homepage": "http://trentrichardson.com/examples/timepicker/", + "license": [ + "MIT" + ], + "require": { + "robloach/component-installer": "*", + "components/jqueryui": "~1.10.2" + }, + "extra": { + "component": { + "name": "jquery-timepicker-addon", + "scripts": [ + "dist/jquery-ui-sliderAccess.js", + "dist/jquery-ui-timepicker-addon.js", + "dist/i18n/**" + ], + "styles": [ + "dist/jquery-ui-timepicker-addon.css" + ] + } + } +} \ No newline at end of file diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-af.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-af.js new file mode 100644 index 0000000..fe9f8c5 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-af.js @@ -0,0 +1,21 @@ +/* Afrikaans translation for the jQuery Timepicker Addon */ +/* Written by Deon Heyns */ +(function($) { + $.timepicker.regional['af'] = { + timeOnlyTitle: 'Kies Tyd', + timeText: 'Tyd ', + hourText: 'Ure ', + minuteText: 'Minute', + secondText: 'Sekondes', + millisecText: 'Millisekondes', + microsecText: 'Mikrosekondes', + timezoneText: 'Tydsone', + currentText: 'Huidige Tyd', + closeText: 'Klaar', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['af']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-am.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-am.js new file mode 100644 index 0000000..69cce8a --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-am.js @@ -0,0 +1,21 @@ +/* Armenian translation for the jQuery Timepicker Addon */ +/* Written by Artavazd Avetisyan artavazda@hotmail.com */ +(function($) { + $.timepicker.regional['am'] = { + timeOnlyTitle: 'Ընտրեք ժամանակը', + timeText: 'Ժամանակը', + hourText: 'Ժամ', + minuteText: 'Րոպե', + secondText: 'Վարկյան', + millisecText: 'Միլիվարկյան', + microsecText: 'Միկրովարկյան', + timezoneText: 'Ժամային գոտին', + currentText: 'Այժմ', + closeText: 'Փակել', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['am']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-bg.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-bg.js new file mode 100644 index 0000000..1efb439 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-bg.js @@ -0,0 +1,21 @@ +/* Bulgarian translation for the jQuery Timepicker Addon */ +/* Written by Plamen Kovandjiev */ +(function($) { + $.timepicker.regional['bg'] = { + timeOnlyTitle: 'Изберете време', + timeText: 'Време', + hourText: 'Час', + minuteText: 'Минути', + secondText: 'Секунди', + millisecText: 'Милисекунди', + microsecText: 'Микросекунди', + timezoneText: 'Часови пояс', + currentText: 'Сега', + closeText: 'Затвори', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['bg']); +})(jQuery); \ No newline at end of file diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ca.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ca.js new file mode 100644 index 0000000..25b4eed --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ca.js @@ -0,0 +1,21 @@ +/* Catalan translation for the jQuery Timepicker Addon */ +/* Written by Sergi Faber */ +(function($) { + $.timepicker.regional['ca'] = { + timeOnlyTitle: 'Escollir una hora', + timeText: 'Hora', + hourText: 'Hores', + minuteText: 'Minuts', + secondText: 'Segons', + millisecText: 'Milisegons', + microsecText: 'Microsegons', + timezoneText: 'Fus horari', + currentText: 'Ara', + closeText: 'Tancar', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['ca']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-cs.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-cs.js new file mode 100644 index 0000000..9d358fa --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-cs.js @@ -0,0 +1,21 @@ +/* Czech translation for the jQuery Timepicker Addon */ +/* Written by Ondřej Vodáček */ +(function($) { + $.timepicker.regional['cs'] = { + timeOnlyTitle: 'Vyberte čas', + timeText: 'Čas', + hourText: 'Hodiny', + minuteText: 'Minuty', + secondText: 'Vteřiny', + millisecText: 'Milisekundy', + microsecText: 'Mikrosekundy', + timezoneText: 'Časové pásmo', + currentText: 'Nyní', + closeText: 'Zavřít', + timeFormat: 'HH:mm', + amNames: ['dop.', 'AM', 'A'], + pmNames: ['odp.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['cs']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-da.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-da.js new file mode 100644 index 0000000..7afb189 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-da.js @@ -0,0 +1,21 @@ +/* Danish translation for the jQuery Timepicker Addon */ +/* Written by Lars H. Jensen (http://www.larshj.dk) */ +(function ($) { + $.timepicker.regional['da'] = { + timeOnlyTitle: 'Vælg tid', + timeText: 'Tid', + hourText: 'Time', + minuteText: 'Minut', + secondText: 'Sekund', + millisecText: 'Millisekund', + microsecText: 'Mikrosekund', + timezoneText: 'Tidszone', + currentText: 'Nu', + closeText: 'Luk', + timeFormat: 'HH:mm', + amNames: ['am', 'AM', 'A'], + pmNames: ['pm', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['da']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-de.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-de.js new file mode 100644 index 0000000..a0ddf9f --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-de.js @@ -0,0 +1,21 @@ +/* German translation for the jQuery Timepicker Addon */ +/* Written by Marvin */ +(function($) { + $.timepicker.regional['de'] = { + timeOnlyTitle: 'Zeit wählen', + timeText: 'Zeit', + hourText: 'Stunde', + minuteText: 'Minute', + secondText: 'Sekunde', + millisecText: 'Millisekunde', + microsecText: 'Mikrosekunde', + timezoneText: 'Zeitzone', + currentText: 'Jetzt', + closeText: 'Fertig', + timeFormat: 'HH:mm', + amNames: ['vorm.', 'AM', 'A'], + pmNames: ['nachm.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['de']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-el.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-el.js new file mode 100644 index 0000000..6b7e827 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-el.js @@ -0,0 +1,21 @@ +/* Hellenic translation for the jQuery Timepicker Addon */ +/* Written by Christos Pontikis */ +(function($) { + $.timepicker.regional['el'] = { + timeOnlyTitle: 'Επιλογή ώρας', + timeText: 'Ώρα', + hourText: 'Ώρες', + minuteText: 'Λεπτά', + secondText: 'Δευτερόλεπτα', + millisecText: 'μιλιδευτερόλεπτο', + microsecText: 'Microseconds', + timezoneText: 'Ζώνη ώρας', + currentText: 'Τώρα', + closeText: 'Κλείσιμο', + timeFormat: 'HH:mm', + amNames: ['π.μ.', 'AM', 'A'], + pmNames: ['μ.μ.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['el']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-es.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-es.js new file mode 100644 index 0000000..d73a1e8 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-es.js @@ -0,0 +1,21 @@ +/* Spanish translation for the jQuery Timepicker Addon */ +/* Written by Ianaré Sévi */ +(function($) { + $.timepicker.regional['es'] = { + timeOnlyTitle: 'Elegir una hora', + timeText: 'Hora', + hourText: 'Horas', + minuteText: 'Minutos', + secondText: 'Segundos', + millisecText: 'Milisegundos', + microsecText: 'Microsegundos', + timezoneText: 'Huso horario', + currentText: 'Ahora', + closeText: 'Cerrar', + timeFormat: 'HH:mm', + amNames: ['a.m.', 'AM', 'A'], + pmNames: ['p.m.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['es']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-et.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-et.js new file mode 100644 index 0000000..2e64cc8 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-et.js @@ -0,0 +1,21 @@ +/* Estonian translation for the jQuery Timepicker Addon */ +/* Written by Karl Sutt (karl@sutt.ee) */ +(function($) { + $.timepicker.regional['et'] = { + timeOnlyTitle: 'Vali aeg', + timeText: 'Aeg', + hourText: 'Tund', + minuteText: 'Minut', + secondText: 'Sekund', + millisecText: 'Millisekundis', + microsecText: 'Mikrosekundis', + timezoneText: 'Ajavöönd', + currentText: 'Praegu', + closeText: 'Valmis', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['et']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-eu.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-eu.js new file mode 100644 index 0000000..8884e4a --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-eu.js @@ -0,0 +1,22 @@ +/* Basque trannslation for JQuery Timepicker Addon */ +/* Translated by Xabi Fer */ +/* Fixed by Asier Iturralde Sarasola - iametza interaktiboa */ +(function($) { + $.timepicker.regional['eu'] = { + timeOnlyTitle: 'Aukeratu ordua', + timeText: 'Ordua', + hourText: 'Orduak', + minuteText: 'Minutuak', + secondText: 'Segundoak', + millisecText: 'Milisegundoak', + microsecText: 'Mikrosegundoak', + timezoneText: 'Ordu-eremua', + currentText: 'Orain', + closeText: 'Itxi', + timeFormat: 'HH:mm', + amNames: ['a.m.', 'AM', 'A'], + pmNames: ['p.m.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['eu']); +})(jQuery); \ No newline at end of file diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-fi.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-fi.js new file mode 100644 index 0000000..3f1d95e --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-fi.js @@ -0,0 +1,21 @@ +/* Finnish translation for the jQuery Timepicker Addon */ +/* Written by Juga Paazmaya (http://github.com/paazmaya) */ +(function($) { + $.timepicker.regional['fi'] = { + timeOnlyTitle: 'Valitse aika', + timeText: 'Aika', + hourText: 'Tunti', + minuteText: 'Minuutti', + secondText: 'Sekunti', + millisecText: 'Millisekunnin', + microsecText: 'Mikrosekuntia', + timezoneText: 'Aikavyöhyke', + currentText: 'Nyt', + closeText: 'Sulje', + timeFormat: 'HH:mm', + amNames: ['ap.', 'AM', 'A'], + pmNames: ['ip.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['fi']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-fr.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-fr.js new file mode 100644 index 0000000..a8a46fe --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-fr.js @@ -0,0 +1,21 @@ +/* French translation for the jQuery Timepicker Addon */ +/* Written by Thomas Lété */ +(function($) { + $.timepicker.regional['fr'] = { + timeOnlyTitle: 'Choisir une heure', + timeText: 'Heure', + hourText: 'Heures', + minuteText: 'Minutes', + secondText: 'Secondes', + millisecText: 'Millisecondes', + microsecText: 'Microsecondes', + timezoneText: 'Fuseau horaire', + currentText: 'Maintenant', + closeText: 'Terminé', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['fr']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-gl.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-gl.js new file mode 100644 index 0000000..900e377 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-gl.js @@ -0,0 +1,21 @@ +/* Galician translation for the jQuery Timepicker Addon */ +/* Written by David Barral */ +(function($) { + $.timepicker.regional['gl'] = { + timeOnlyTitle: 'Elixir unha hora', + timeText: 'Hora', + hourText: 'Horas', + minuteText: 'Minutos', + secondText: 'Segundos', + millisecText: 'Milisegundos', + microsecText: 'Microssegundos', + timezoneText: 'Fuso horario', + currentText: 'Agora', + closeText: 'Pechar', + timeFormat: 'HH:mm', + amNames: ['a.m.', 'AM', 'A'], + pmNames: ['p.m.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['gl']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-he.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-he.js new file mode 100644 index 0000000..eb71018 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-he.js @@ -0,0 +1,21 @@ +/* Hebrew translation for the jQuery Timepicker Addon */ +/* Written by Lior Lapid */ +(function($) { + $.timepicker.regional["he"] = { + timeOnlyTitle: "בחירת זמן", + timeText: "שעה", + hourText: "שעות", + minuteText: "דקות", + secondText: "שניות", + millisecText: "אלפית השנייה", + microsecText: "מיקרו", + timezoneText: "אזור זמן", + currentText: "עכשיו", + closeText:"סגור", + timeFormat: "HH:mm", + amNames: ['לפנה"צ', 'AM', 'A'], + pmNames: ['אחה"צ', 'PM', 'P'], + isRTL: true + }; + $.timepicker.setDefaults($.timepicker.regional["he"]); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-hr.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-hr.js new file mode 100644 index 0000000..c314b8e --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-hr.js @@ -0,0 +1,21 @@ +/* Croatian translation for the jQuery Timepicker Addon */ +/* Written by Mladen */ +(function($) { + $.timepicker.regional['hr'] = { + timeOnlyTitle: 'Odaberi vrijeme', + timeText: 'Vrijeme', + hourText: 'Sati', + minuteText: 'Minute', + secondText: 'Sekunde', + millisecText: 'Milisekunde', + microsecText: 'Mikrosekunde', + timezoneText: 'Vremenska zona', + currentText: 'Sada', + closeText: 'Gotovo', + timeFormat: 'HH:mm', + amNames: ['a.m.', 'AM', 'A'], + pmNames: ['p.m.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['hr']); +})(jQuery); \ No newline at end of file diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-hu.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-hu.js new file mode 100644 index 0000000..fd1f5e1 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-hu.js @@ -0,0 +1,21 @@ +/* Hungarian translation for the jQuery Timepicker Addon */ +/* Written by Vas Gábor */ +(function($) { + $.timepicker.regional['hu'] = { + timeOnlyTitle: 'Válasszon időpontot', + timeText: 'Idő', + hourText: 'Óra', + minuteText: 'Perc', + secondText: 'Másodperc', + millisecText: 'Milliszekundumos', + microsecText: 'Ezredmásodperc', + timezoneText: 'Időzóna', + currentText: 'Most', + closeText: 'Kész', + timeFormat: 'HH:mm', + amNames: ['de.', 'AM', 'A'], + pmNames: ['du.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['hu']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-id.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-id.js new file mode 100644 index 0000000..50a976b --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-id.js @@ -0,0 +1,21 @@ +/* Indonesian translation for the jQuery Timepicker Addon */ +/* Written by Nia */ +(function($) { + $.timepicker.regional['id'] = { + timeOnlyTitle: 'Pilih Waktu', + timeText: 'Waktu', + hourText: 'Pukul', + minuteText: 'Menit', + secondText: 'Detik', + millisecText: 'Milidetik', + microsecText: 'Mikrodetik', + timezoneText: 'Zona Waktu', + currentText: 'Sekarang', + closeText: 'OK', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['id']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-it.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-it.js new file mode 100644 index 0000000..ea976fd --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-it.js @@ -0,0 +1,21 @@ +/* Italian translation for the jQuery Timepicker Addon */ +/* Written by Marco "logicoder" Del Tongo */ +(function($) { + $.timepicker.regional['it'] = { + timeOnlyTitle: 'Scegli orario', + timeText: 'Orario', + hourText: 'Ora', + minuteText: 'Minuti', + secondText: 'Secondi', + millisecText: 'Millisecondi', + microsecText: 'Microsecondi', + timezoneText: 'Fuso orario', + currentText: 'Adesso', + closeText: 'Chiudi', + timeFormat: 'HH:mm', + amNames: ['m.', 'AM', 'A'], + pmNames: ['p.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['it']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ja.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ja.js new file mode 100644 index 0000000..15c7b79 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ja.js @@ -0,0 +1,21 @@ +/* Japanese translation for the jQuery Timepicker Addon */ +/* Written by Jun Omae */ +(function($) { + $.timepicker.regional['ja'] = { + timeOnlyTitle: '時間を選択', + timeText: '時間', + hourText: '時', + minuteText: '分', + secondText: '秒', + millisecText: 'ミリ秒', + microsecText: 'マイクロ秒', + timezoneText: 'タイムゾーン', + currentText: '現時刻', + closeText: '閉じる', + timeFormat: 'HH:mm', + amNames: ['午前', 'AM', 'A'], + pmNames: ['午後', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['ja']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ko.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ko.js new file mode 100644 index 0000000..0a41c5b --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ko.js @@ -0,0 +1,21 @@ +/* Korean translation for the jQuery Timepicker Addon */ +/* Written by Genie */ +(function($) { + $.timepicker.regional['ko'] = { + timeOnlyTitle: '시간 선택', + timeText: '시간', + hourText: '시', + minuteText: '분', + secondText: '초', + millisecText: '밀리초', + microsecText: '마이크로', + timezoneText: '표준 시간대', + currentText: '현재 시각', + closeText: '닫기', + timeFormat: 'tt h:mm', + amNames: ['오전', 'AM', 'A'], + pmNames: ['오후', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['ko']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-lt.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-lt.js new file mode 100644 index 0000000..eb7b3c7 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-lt.js @@ -0,0 +1,21 @@ +/* Lithuanian translation for the jQuery Timepicker Addon */ +/* Written by Irmantas Šiupšinskas */ +(function($) { + $.timepicker.regional['lt'] = { + timeOnlyTitle: 'Pasirinkite laiką', + timeText: 'Laikas', + hourText: 'Valandos', + minuteText: 'Minutės', + secondText: 'Sekundės', + millisecText: 'Milisekundės', + microsecText: 'Mikrosekundės', + timezoneText: 'Laiko zona', + currentText: 'Dabar', + closeText: 'Uždaryti', + timeFormat: 'HH:mm', + amNames: ['priešpiet', 'AM', 'A'], + pmNames: ['popiet', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['lt']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-nl.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-nl.js new file mode 100644 index 0000000..8189cc4 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-nl.js @@ -0,0 +1,21 @@ +/* Dutch translation for the jQuery Timepicker Addon */ +/* Written by Martijn van der Lee */ +(function($) { + $.timepicker.regional['nl'] = { + timeOnlyTitle: 'Tijdstip', + timeText: 'Tijd', + hourText: 'Uur', + minuteText: 'Minuut', + secondText: 'Seconde', + millisecText: 'Milliseconde', + microsecText: 'Microseconde', + timezoneText: 'Tijdzone', + currentText: 'Vandaag', + closeText: 'Sluiten', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['nl']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-no.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-no.js new file mode 100644 index 0000000..1eeee6d --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-no.js @@ -0,0 +1,21 @@ +/* Norwegian translation for the jQuery Timepicker Addon */ +/* Written by Morten Hauan (http://hauan.me) */ +(function($) { + $.timepicker.regional['no'] = { + timeOnlyTitle: 'Velg tid', + timeText: 'Tid', + hourText: 'Time', + minuteText: 'Minutt', + secondText: 'Sekund', + millisecText: 'Millisekund', + microsecText: 'mikrosekund', + timezoneText: 'Tidssone', + currentText: 'Nå', + closeText: 'Lukk', + timeFormat: 'HH:mm', + amNames: ['am', 'AM', 'A'], + pmNames: ['pm', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['no']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-pl.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-pl.js new file mode 100644 index 0000000..5b7d4a9 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-pl.js @@ -0,0 +1,21 @@ +/* Polish translation for the jQuery Timepicker Addon */ +/* Written by Michał Pena */ +(function($) { + $.timepicker.regional['pl'] = { + timeOnlyTitle: 'Wybierz godzinę', + timeText: 'Czas', + hourText: 'Godzina', + minuteText: 'Minuta', + secondText: 'Sekunda', + millisecText: 'Milisekunda', + microsecText: 'Mikrosekunda', + timezoneText: 'Strefa czasowa', + currentText: 'Teraz', + closeText: 'Gotowe', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['pl']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-pt-BR.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-pt-BR.js new file mode 100644 index 0000000..2c1b02f --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-pt-BR.js @@ -0,0 +1,21 @@ +/* Brazilian Portuguese translation for the jQuery Timepicker Addon */ +/* Written by Diogo Damiani (diogodamiani@gmail.com) */ +(function ($) { + $.timepicker.regional['pt-BR'] = { + timeOnlyTitle: 'Escolha o horário', + timeText: 'Horário', + hourText: 'Hora', + minuteText: 'Minutos', + secondText: 'Segundos', + millisecText: 'Milissegundos', + microsecText: 'Microssegundos', + timezoneText: 'Fuso horário', + currentText: 'Agora', + closeText: 'Fechar', + timeFormat: 'HH:mm', + amNames: ['a.m.', 'AM', 'A'], + pmNames: ['p.m.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['pt-BR']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-pt.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-pt.js new file mode 100644 index 0000000..bc549e0 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-pt.js @@ -0,0 +1,21 @@ +/* Portuguese translation for the jQuery Timepicker Addon */ +/* Written by Luan Almeida */ +(function($) { + $.timepicker.regional['pt'] = { + timeOnlyTitle: 'Escolha uma hora', + timeText: 'Hora', + hourText: 'Horas', + minuteText: 'Minutos', + secondText: 'Segundos', + millisecText: 'Milissegundos', + microsecText: 'Microssegundos', + timezoneText: 'Fuso horário', + currentText: 'Agora', + closeText: 'Fechar', + timeFormat: 'HH:mm', + amNames: ['a.m.', 'AM', 'A'], + pmNames: ['p.m.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['pt']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ro.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ro.js new file mode 100644 index 0000000..01acce7 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ro.js @@ -0,0 +1,21 @@ +/* Romanian translation for the jQuery Timepicker Addon */ +/* Written by Romeo Adrian Cioaba */ +(function($) { + $.timepicker.regional['ro'] = { + timeOnlyTitle: 'Alegeţi o oră', + timeText: 'Timp', + hourText: 'Ore', + minuteText: 'Minute', + secondText: 'Secunde', + millisecText: 'Milisecunde', + microsecText: 'Microsecunde', + timezoneText: 'Fus orar', + currentText: 'Acum', + closeText: 'Închide', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['ro']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ru.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ru.js new file mode 100644 index 0000000..d7169fa --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-ru.js @@ -0,0 +1,21 @@ +/* Russian translation for the jQuery Timepicker Addon */ +/* Written by Trent Richardson */ +(function($) { + $.timepicker.regional['ru'] = { + timeOnlyTitle: 'Выберите время', + timeText: 'Время', + hourText: 'Часы', + minuteText: 'Минуты', + secondText: 'Секунды', + millisecText: 'Миллисекунды', + microsecText: 'Микросекунды', + timezoneText: 'Часовой пояс', + currentText: 'Сейчас', + closeText: 'Закрыть', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['ru']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-sk.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-sk.js new file mode 100644 index 0000000..15700e0 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-sk.js @@ -0,0 +1,21 @@ +/* Slovak translation for the jQuery Timepicker Addon */ +/* Written by David Vallner */ +(function($) { + $.timepicker.regional['sk'] = { + timeOnlyTitle: 'Zvoľte čas', + timeText: 'Čas', + hourText: 'Hodiny', + minuteText: 'Minúty', + secondText: 'Sekundy', + millisecText: 'Milisekundy', + microsecText: 'Mikrosekundy', + timezoneText: 'Časové pásmo', + currentText: 'Teraz', + closeText: 'Zavrieť', + timeFormat: 'H:m', + amNames: ['dop.', 'AM', 'A'], + pmNames: ['pop.', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['sk']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-sr-RS.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-sr-RS.js new file mode 100644 index 0000000..1ee4aae --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-sr-RS.js @@ -0,0 +1,21 @@ +/* Serbian cyrilic translation for the jQuery Timepicker Addon */ +/* Written by Vladimir Jelovac */ +(function($) { + $.timepicker.regional['sr-RS'] = { + timeOnlyTitle: 'Одаберите време', + timeText: 'Време', + hourText: 'Сати', + minuteText: 'Минути', + secondText: 'Секунде', + millisecText: 'Милисекунде', + microsecText: 'Микросекунде', + timezoneText: 'Временска зона', + currentText: 'Сада', + closeText: 'Затвори', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['sr-RS']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-sr-YU.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-sr-YU.js new file mode 100644 index 0000000..cb99fb8 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-sr-YU.js @@ -0,0 +1,21 @@ +/* Serbian latin translation for the jQuery Timepicker Addon */ +/* Written by Vladimir Jelovac */ +(function($) { + $.timepicker.regional['sr-YU'] = { + timeOnlyTitle: 'Odaberite vreme', + timeText: 'Vreme', + hourText: 'Sati', + minuteText: 'Minuti', + secondText: 'Sekunde', + millisecText: 'Milisekunde', + microsecText: 'Mikrosekunde', + timezoneText: 'Vremenska zona', + currentText: 'Sada', + closeText: 'Zatvori', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['sr-YU']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-sv.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-sv.js new file mode 100644 index 0000000..4540ac6 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-sv.js @@ -0,0 +1,21 @@ +/* Swedish translation for the jQuery Timepicker Addon */ +/* Written by Nevon */ +(function($) { + $.timepicker.regional['sv'] = { + timeOnlyTitle: 'Välj en tid', + timeText: 'Tid', + hourText: 'Timme', + minuteText: 'Minut', + secondText: 'Sekund', + millisecText: 'Millisekund', + microsecText: 'Mikrosekund', + timezoneText: 'Tidszon', + currentText: 'Nu', + closeText: 'Stäng', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['sv']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-th.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-th.js new file mode 100644 index 0000000..7042e8c --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-th.js @@ -0,0 +1,18 @@ +/* Thai translation for the jQuery Timepicker Addon */ +/* Written by Yote Wachirapornpongsa */ +(function($) { + $.timepicker.regional['th'] = { + timeOnlyTitle: 'เลือกเวลา', + timeText: 'เวลา ', + hourText: 'ชั่วโมง ', + minuteText: 'นาที', + secondText: 'วินาที', + millisecText: 'มิลลิวินาที', + microsecText: 'ไมโคริวินาที', + timezoneText: 'เขตเวลา', + currentText: 'เวลาปัจจุบัน', + closeText: 'ปิด', + timeFormat: 'hh:mm tt' + }; + $.timepicker.setDefaults($.timepicker.regional['th']); +})(jQuery); \ No newline at end of file diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-tr.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-tr.js new file mode 100644 index 0000000..51f89d6 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-tr.js @@ -0,0 +1,21 @@ +/* Turkish translation for the jQuery Timepicker Addon */ +/* Written by Fehmi Can Saglam, Edited by Goktug Ozturk */ +(function($) { + $.timepicker.regional['tr'] = { + timeOnlyTitle: 'Zaman Seçiniz', + timeText: 'Zaman', + hourText: 'Saat', + minuteText: 'Dakika', + secondText: 'Saniye', + millisecText: 'Milisaniye', + microsecText: 'Mikrosaniye', + timezoneText: 'Zaman Dilimi', + currentText: 'Şu an', + closeText: 'Tamam', + timeFormat: 'HH:mm', + amNames: ['ÖÖ', 'Ö'], + pmNames: ['ÖS', 'S'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['tr']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-uk.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-uk.js new file mode 100644 index 0000000..a239fe2 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-uk.js @@ -0,0 +1,21 @@ +/* Ukrainian translation for the jQuery Timepicker Addon */ +/* Written by Sergey Noskov */ +(function($) { + $.timepicker.regional['uk'] = { + timeOnlyTitle: 'Виберіть час', + timeText: 'Час', + hourText: 'Години', + minuteText: 'Хвилини', + secondText: 'Секунди', + millisecText: 'Мілісекунди', + microsecText: 'Мікросекунди', + timezoneText: 'Часовий пояс', + currentText: 'Зараз', + closeText: 'Закрити', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['uk']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-vi.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-vi.js new file mode 100644 index 0000000..60d712a --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-vi.js @@ -0,0 +1,21 @@ +/* Vietnamese translation for the jQuery Timepicker Addon */ +/* Written by Nguyen Dinh Trung */ +(function($) { + $.timepicker.regional['vi'] = { + timeOnlyTitle: 'Chọn giờ', + timeText: 'Thời gian', + hourText: 'Giờ', + minuteText: 'Phút', + secondText: 'Giây', + millisecText: 'Mili giây', + microsecText: 'Micrô giây', + timezoneText: 'Múi giờ', + currentText: 'Hiện thời', + closeText: 'Đóng', + timeFormat: 'HH:mm', + amNames: ['SA', 'S'], + pmNames: ['CH', 'C'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['vi']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-zh-CN.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-zh-CN.js new file mode 100644 index 0000000..e73ac3b --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-zh-CN.js @@ -0,0 +1,21 @@ +/* Simplified Chinese translation for the jQuery Timepicker Addon / +/ Written by Will Lu */ +(function($) { + $.timepicker.regional['zh-CN'] = { + timeOnlyTitle: '选择时间', + timeText: '时间', + hourText: '小时', + minuteText: '分钟', + secondText: '秒钟', + millisecText: '毫秒', + microsecText: '微秒', + timezoneText: '时区', + currentText: '现在时间', + closeText: '关闭', + timeFormat: 'HH:mm', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['zh-CN']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-zh-TW.js b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-zh-TW.js new file mode 100644 index 0000000..9cbeabf --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/i18n/jquery-ui-timepicker-zh-TW.js @@ -0,0 +1,21 @@ +/* Chinese translation for the jQuery Timepicker Addon */ +/* Written by Alang.lin */ +(function($) { + $.timepicker.regional['zh-TW'] = { + timeOnlyTitle: '選擇時分秒', + timeText: '時間', + hourText: '時', + minuteText: '分', + secondText: '秒', + millisecText: '毫秒', + microsecText: '微秒', + timezoneText: '時區', + currentText: '現在時間', + closeText: '確定', + timeFormat: 'HH:mm', + amNames: ['上午', 'AM', 'A'], + pmNames: ['下午', 'PM', 'P'], + isRTL: false + }; + $.timepicker.setDefaults($.timepicker.regional['zh-TW']); +})(jQuery); diff --git a/public/javascripts/jquery-timepicker-addon/dist/index.html b/public/javascripts/jquery-timepicker-addon/dist/index.html new file mode 100644 index 0000000..3d1fa60 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/index.html @@ -0,0 +1,980 @@ + + + + + Adding a Timepicker to jQuery UI Datepicker + + + + + + + + + + +
+

Adding a Timepicker to jQuery UI Datepicker

+ +

The timepicker addon adds a timepicker to jQuery UI Datepicker, thus the datepicker and slider components (jQueryUI) are required for using any of these. In addition all datepicker options are still available through the timepicker addon.

+ +

If you are interested in contributing to Timepicker Addon please check it out on GitHub. If you do make additions please keep in mind I enjoy tabs over spaces,.. But contributions are welcome in any form.

+ +

Back to Blog or Follow on Twitter

+ + Car BounceTry my new app to keep you informed of your car's financing status and value. + +

Donation

+

Has this Timepicker Addon been helpful to you?

+
+
+ + + + +
+
+ +
+ + + +
+

Getting Started

+ +

Highly Recommended

+ +

Handling Time eBook

+
+

Check out the Handling Time eBook to learn from the basic setup to advanced i18n usage, and from client's javascript to the server's database.

+ Handling Time eBook +

buy eBook + Example code

+

buy eBook

+
+
+ +

Subscribe to Blog and Twitter

+

Subscribe to my blog via email and follow @PracticalWeb on Twitter. I post for nearly every new version, so you know about updates.

+
+
+ +

Download

+

Download Timepicker Addon

+

Download/Contribute on GitHub (Need the entire repo? Find a bug? See if its fixed here)

+

There is a small bit of required CSS (Download):

+
/* css for timepicker */
+.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
+.ui-timepicker-div dl { text-align: left; }
+.ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; }
+.ui-timepicker-div dl dd { margin: 0 10px 10px 45%; }
+.ui-timepicker-div td { font-size: 90%; }
+.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
+
+.ui-timepicker-rtl{ direction: rtl; }
+.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; }
+.ui-timepicker-rtl dl dt{ float: right; clear: right; }
+.ui-timepicker-rtl dl dd { margin: 0 45% 10px 10px; }
+
+
+ +

Requirements

+

You also need to include jQuery and jQuery UI with datepicker and slider wigits. You should include them in your page in the following order:

+
    +
  1. jQuery
  2. +
  3. jQueryUI (with datepicker and slider wigits)
  4. +
  5. Timepicker
  6. +
+ +
+

Version

+

Version 1.4.4

+ +

Last updated on 2014-03-29

+

jQuery Timepicker Addon is currently available for use in all personal or commercial projects under the MIT license.

+

MIT License

+ +
+ + + +
+

Options

+ +

The timepicker does inherit all options from datepicker. However, there are many options that are shared by them both, and many timepicker only options:

+ +

Localization Options

+
+
currentText
+
Default: "Now", A Localization Setting - Text for the Now button.
+ +
closeText
+
Default: "Done", A Localization Setting - Text for the Close button.
+ +
amNames
+
Default: ['AM', 'A'], A Localization Setting - Array of strings to try and parse against to determine AM.
+ +
pmNames
+
Default: ['PM', 'P'], A Localization Setting - Array of strings to try and parse against to determine PM.
+ +
timeFormat
+
Default: "HH:mm", A Localization Setting - String of format tokens to be replaced with the time. See Formatting.
+ +
timeSuffix
+
Default: "", A Localization Setting - String to place after the formatted time.
+ +
timeOnlyTitle
+
Default: "Choose Time", A Localization Setting - Title of the wigit when using only timepicker.
+ +
timeText
+
Default: "Time", A Localization Setting - Label used within timepicker for the formatted time.
+ +
hourText
+
Default: "Hour", A Localization Setting - Label used to identify the hour slider.
+ +
minuteText
+
Default: "Minute", A Localization Setting - Label used to identify the minute slider.
+ +
secondText
+
Default: "Second", A Localization Setting - Label used to identify the second slider.
+ +
millisecText
+
Default: "Millisecond", A Localization Setting - Label used to identify the millisecond slider.
+ +
microsecText
+
Default: "Microsecond", A Localization Setting - Label used to identify the microsecond slider.
+ +
timezoneText
+
Default: "Timezone", A Localization Setting - Label used to identify the timezone slider.
+ +
isRTL
+
Default: false, A Localization Setting - Right to Left support.
+
+ +

Alt Field Options

+
+ +
altFieldTimeOnly
+
Default: true - When altField is used from datepicker altField will only receive the formatted time and the original field only receives date.
+ +
altSeparator
+
Default: (separator option) - String placed between formatted date and formatted time in the altField.
+ +
altTimeSuffix
+
Default: (timeSuffix option) - String always placed after the formatted time in the altField.
+ +
altTimeFormat
+
Default: (timeFormat option) - The time format to use with the altField.
+
+ +

Timezone Options

+
+ +
timezoneList
+
Default: [generated timezones] - An array of timezones used to populate the timezone select. Can be an array of values or an array of objects: { label: "EDT", value: -240 }. The value should be the offset number in minutes. So "-0400" which is the format "-hhmm", would equate to -240 minutes.
+
+ +

Time Field Options

+
+ +
controlType
+
Default: 'slider' - Whether to use 'slider' or 'select'. If 'slider' is unavailable through jQueryUI, 'select' will be used. For advanced usage you may pass an object which implements "create", "options", "value" methods to use controls other than sliders or selects. See the _controls property in the source code for more details. +
{
+	create: function(tp_inst, obj, unit, val, min, max, step){	
+		// generate whatever controls you want here, just return obj
+	},
+	options: function(tp_inst, obj, unit, opts, val){
+		// if val==undefined return the value, else return obj
+	},
+	value: function(tp_inst, obj, unit, val){
+		// if val==undefined return the value, else return obj
+	}
+}
+
+ +
showHour
+
Default: null - Whether to show the hour control. The default of null will use detection from timeFormat.
+ +
showMinute
+
Default: null - Whether to show the minute control. The default of null will use detection from timeFormat.
+ +
showSecond
+
Default: null - Whether to show the second control. The default of null will use detection from timeFormat.
+ +
showMillisec
+
Default: null - Whether to show the millisecond control. The default of null will use detection from timeFormat.
+ +
showMicrosec
+
Default: null - Whether to show the microsecond control. The default of null will use detection from timeFormat.
+ +
showTimezone
+
Default: null - Whether to show the timezone select.
+ +
showTime
+
Default: true - Whether to show the time selected within the datetimepicker.
+ +
stepHour
+
Default: 1 - Hours per step the slider makes.
+ +
stepMinute
+
Default: 1 - Minutes per step the slider makes.
+ +
stepSecond
+
Default: 1 - Seconds per step the slider makes.
+ +
stepMillisec
+
Default: 1 - Milliseconds per step the slider makes.
+ +
stepMicrosec
+
Default: 1 - Microseconds per step the slider makes.
+ +
hour
+
Default: 0 - Initial hour set.
+ +
minute
+
Default: 0 - Initial minute set.
+ +
second
+
Default: 0 - Initial second set.
+ +
millisec
+
Default: 0 - Initial millisecond set.
+ +
microsec
+
Default: 0 - Initial microsecond set. Note: Javascript's native Date object does not natively support microseconds. Timepicker adds ability to simply Date.setMicroseconds(m) and Date.getMicroseconds(). Date comparisons will not acknowledge microseconds. Use this only for display purposes.
+ +
timezone
+
Default: null - Initial timezone set. This is the offset in minutes. If null the browser's local timezone will be used. If you're timezone is "-0400" you would use -240. For backwards compatibility you may pass "-0400", however the timezone is stored in minutes and more reliable.
+ +
hourMin
+
Default: 0 - The minimum hour allowed for all dates.
+ +
minuteMin
+
Default: 0 - The minimum minute allowed for all dates.
+ +
secondMin
+
Default: 0 - The minimum second allowed for all dates.
+ +
millisecMin
+
Default: 0 - The minimum millisecond allowed for all dates.
+ +
microsecMin
+
Default: 0 - The minimum microsecond allowed for all dates.
+ +
hourMax
+
Default: 23 - The maximum hour allowed for all dates.
+ +
minuteMax
+
Default: 59 - The maximum minute allowed for all dates.
+ +
secondMax
+
Default: 59 - The maximum second allowed for all dates.
+ +
millisecMax
+
Default: 999 - The maximum millisecond allowed for all dates.
+ +
microsecMax
+
Default: 999 - The maximum microsecond allowed for all dates.
+ +
hourGrid
+
Default: 0 - When greater than 0 a label grid will be generated under the slider. This number represents the units (in hours) between labels.
+ +
minuteGrid
+
Default: 0 - When greater than 0 a label grid will be generated under the slider. This number represents the units (in minutes) between labels.
+ +
secondGrid
+
Default: 0 - When greater than 0 a label grid will be genereated under the slider. This number represents the units (in seconds) between labels.
+ +
millisecGrid
+
Default: 0 - When greater than 0 a label grid will be genereated under the slider. This number represents the units (in milliseconds) between labels.
+ +
microsecGrid
+
Default: 0 - When greater than 0 a label grid will be genereated under the slider. This number represents the units (in microseconds) between labels.
+
+ +

Other Options

+
+
showButtonPanel
+
Default: true - Whether to show the button panel at the bottom. This is generally needed.
+ +
timeOnly
+
Default: false - Hide the datepicker and only provide a time interface.
+ +
timeOnlyShowDate
+
Default: false - Show the date and time in the input, but only allow the timepicker.
+ +
onSelect
+
Default: null - Function to be called when a date is chosen or time has changed (parameters: datetimeText, datepickerInstance).
+ +
alwaysSetTime
+
Default: true - Always have a time set internally, even before user has chosen one.
+ +
separator
+
Default: " " - When formatting the time this string is placed between the formatted date and formatted time.
+ +
pickerTimeFormat
+
Default: (timeFormat option) - How to format the time displayed within the timepicker.
+ +
pickerTimeSuffix
+
Default: (timeSuffix option) - String to place after the formatted time within the timepicker.
+ +
showTimepicker
+
Default: true - Whether to show the timepicker within the datepicker.
+ +
addSliderAccess
+
Default: false - Adds the sliderAccess plugin to sliders within timepicker
+ +
sliderAccessArgs
+
Default: null - Object to pass to sliderAccess when used.
+ +
defaultValue
+
Default: null - String of the default time value placed in the input on focus when the input is empty.
+ +
minDateTime
+
Default: null - Date object of the minimum datetime allowed. Also available as minDate.
+ +
maxDateTime
+
Default: null - Date object of the maximum datetime allowed. Also Available as maxDate.
+ +
minTime
+
Default: null - String of the minimum time allowed. '8:00 am' will restrict to times after 8am
+ +
maxTime
+
Default: null - String of the maximum time allowed. '8:00 pm' will restrict to times before 8pm
+ +
parse
+
Default: 'strict' - How to parse the time string. Two methods are provided: 'strict' which must match the timeFormat exactly, and 'loose' which uses javascript's new Date(timeString) to guess the time. You may also pass in a function(timeFormat, timeString, options) to handle the parsing yourself, returning a simple object: +
{
+	hour: 19,
+	minute: 10,
+	second: 23,
+	millisec: 45,
+	microsec: 23,
+	timezone: '-0400'
+}
+
+
+ +
+ + + +
+ +

Formatting Your Time

+ +

The default format is "HH:mm". To use 12 hour time use something similar to: "hh:mm tt". When both "t" and lower case "h" are present in the timeFormat, 12 hour time will be used.

+ +
+
H
Hour with no leading 0 (24 hour)
+
HH
Hour with leading 0 (24 hour)
+
h
Hour with no leading 0 (12 hour)
+
hh
Hour with leading 0 (12 hour)
+
m
Minute with no leading 0
+
mm
Minute with leading 0
+
s
Second with no leading 0
+
ss
Second with leading 0
+
l
Milliseconds always with leading 0
+
c
Microseconds always with leading 0
+
t
a or p for AM/PM
+
T
A or P for AM/PM
+
tt
am or pm for AM/PM
+
TT
AM or PM for AM/PM
+
z
Timezone as defined by timezoneList
+
Z
Timezone in Iso 8601 format (+04:45)
+
'...'
Literal text (Uses single quotes)
+
+ +

Formats are used in the following ways:

+
    +
  • timeFormat option
  • +
  • altTimeFormat option
  • +
  • pickerTimeFormat option
  • +
  • $.datepicker.formatTime(format, timeObj, options) utility method
  • +
  • $.datepicker.parseTime(format, timeStr, options) utility method
  • +
+ +

For help with formatting the date portion, visit the datepicker documentation for formatting dates.

+
+ + + +
+ +

Working with Localizations

+ +

Timepicker comes with many translations and localizations, thanks to all the contributors. They can be found in the i18n folder in the git repo.

+ +

The quick and cheap way to use localizations is to pass in options to a timepicker instance:

+ +
$('#example123').timepicker({
+	timeOnlyTitle: 'Выберите время',
+	timeText: 'Время',
+	hourText: 'Часы',
+	minuteText: 'Минуты',
+	secondText: 'Секунды',
+	currentText: 'Сейчас',
+	closeText: 'Закрыть'
+});
+
+

However, if you plan to use timepicker extensively you will need to include (build your own) localization. It is simply assigning those same variables to an object. As you see in the example below we maintain a separate object for timepicker. This way we aren't bound to any changes within datepicker.

+ +
$.datepicker.regional['ru'] = {
+	closeText: 'Закрыть',
+	prevText: '<Пред',
+	nextText: 'След>',
+	currentText: 'Сегодня',
+	monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
+	'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
+	monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
+	'Июл','Авг','Сен','Окт','Ноя','Дек'],
+	dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
+	dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
+	dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
+	weekHeader: 'Не',
+	dateFormat: 'dd.mm.yy',
+	firstDay: 1,
+	isRTL: false,
+	showMonthAfterYear: false,
+	yearSuffix: ''
+};
+$.datepicker.setDefaults($.datepicker.regional['ru']);
+
+
+$.timepicker.regional['ru'] = {
+	timeOnlyTitle: 'Выберите время',
+	timeText: 'Время',
+	hourText: 'Часы',
+	minuteText: 'Минуты',
+	secondText: 'Секунды',
+	millisecText: 'Миллисекунды',
+	timezoneText: 'Часовой пояс',
+	currentText: 'Сейчас',
+	closeText: 'Закрыть',
+	timeFormat: 'HH:mm',
+	amNames: ['AM', 'A'],
+	pmNames: ['PM', 'P'],
+	isRTL: false
+};
+$.timepicker.setDefaults($.timepicker.regional['ru']);
+
+

Now all you have to do is call timepicker and the Russian localization is used. Generally you only need to include the localization file, it will setDefaults() for you.

+

You can also visit localization for datepicker for more information about datepicker localizations.

+
+ + + +
+

Examples

+ + + +

Basic Initializations

+ + +
+

Add a simple datetimepicker to jQuery UI's datepicker

+
+ +
+
+$('#basic_example_1').datetimepicker();
+
+
+ + + +
+

Add only a timepicker:

+
+ +
+
+$('#basic_example_2').timepicker();
+
+
+ + +
+

Format the time:

+
+ +
+
+$('#basic_example_3').datetimepicker({
+	timeFormat: "hh:mm tt"
+});
+
+
+ +

Using Timezones

+ + +
+

Simplest timezone usage:

+
+ +
+
+$('#timezone_example_1').datetimepicker({
+	timeFormat: 'hh:mm tt z'
+});
+
+
+ + +
+

Define your own timezone options:

+
+ +
+
+$('#timezone_example_2').datetimepicker({
+	timeFormat: 'HH:mm z',
+	timezoneList: [ 
+			{ value: -300, label: 'Eastern'}, 
+			{ value: -360, label: 'Central' }, 
+			{ value: -420, label: 'Mountain' }, 
+			{ value: -480, label: 'Pacific' } 
+		]
+});
+
+
+ + +
+

You may also use timezone string abbreviations for values. This should be used with caution. Computing accurate javascript Date objects may not be possible when trying to retrieve or set the date from timepicker (see setDate and getDate examples below). For simple input values however this should work.

+
+ +
+
+$('#timezone_example_3').datetimepicker({
+	timeFormat: 'HH:mm z',
+	timezone: 'MT',
+	timezoneList: [ 
+			{ value: 'ET', label: 'Eastern'}, 
+			{ value: 'CT', label: 'Central' }, 
+			{ value: 'MT', label: 'Mountain' }, 
+			{ value: 'PT', label: 'Pacific' } 
+		]
+});
+
+
+
+ +

Slider Modifications

+ + +
+

Add a grid to each slider:

+
+ +
+
+$('#slider_example_1').timepicker({
+	hourGrid: 4,
+	minuteGrid: 10,
+	timeFormat: 'hh:mm tt'
+});
+
+
+ + +
+

Set the interval step of sliders:

+
+ +
+
+$('#slider_example_2').datetimepicker({
+	timeFormat: 'HH:mm:ss',
+	stepHour: 2,
+	stepMinute: 10,
+	stepSecond: 10
+});
+
+
+ + +
+

Add sliderAccess plugin for touch devices:

+
+ +
+
+$('#slider_example_3').datetimepicker({
+	addSliderAccess: true,
+	sliderAccessArgs: { touchonly: false }
+});
+
+ + +
+

Use dropdowns instead of sliders. By default if slider is not available dropdowns will be used.

+
+ +
+
+$('#slider_example_4').datetimepicker({
+	controlType: 'select',
+	timeFormat: 'hh:mm tt'
+});
+
+ + +
+

Create your own control by implementing the create, options, and value methods. If you want to use your new control for all instances use the $.timepicker.setDefaults({controlType:myControl}). Here we implement jQueryUI's spinner control (jQueryUI 1.9+).

+
+ +
+
var myControl=  {
+	create: function(tp_inst, obj, unit, val, min, max, step){
+		$('<input class="ui-timepicker-input" value="'+val+'" style="width:50%">')
+			.appendTo(obj)
+			.spinner({
+				min: min,
+				max: max,
+				step: step,
+				change: function(e,ui){ // key events
+						// don't call if api was used and not key press
+						if(e.originalEvent !== undefined)
+							tp_inst._onTimeChange();
+						tp_inst._onSelectHandler();
+					},
+				spin: function(e,ui){ // spin events
+						tp_inst.control.value(tp_inst, obj, unit, ui.value);
+						tp_inst._onTimeChange();
+						tp_inst._onSelectHandler();
+					}
+			});
+		return obj;
+	},
+	options: function(tp_inst, obj, unit, opts, val){
+		if(typeof(opts) == 'string' && val !== undefined)
+			return obj.find('.ui-timepicker-input').spinner(opts, val);
+		return obj.find('.ui-timepicker-input').spinner(opts);
+	},
+	value: function(tp_inst, obj, unit, val){
+		if(val !== undefined)
+			return obj.find('.ui-timepicker-input').spinner('value', val);
+		return obj.find('.ui-timepicker-input').spinner('value');
+	}
+};
+
+$('#slider_example_5').datetimepicker({
+	controlType: myControl
+});
+
+ +

Alternate Fields

+ + +
+

Alt field in the simplest form:

+
+ + +
+
+$('#alt_example_1').datetimepicker({
+	altField: "#alt_example_1_alt"
+});
+
+
+ + +
+

With datetime in both:

+
+ + +
+
+$('#alt_example_2').datetimepicker({
+	altField: "#alt_example_2_alt",
+	altFieldTimeOnly: false
+});
+
+
+ + +
+

Format the altField differently:

+
+ + +
+
+$('#alt_example_3').datetimepicker({
+	altField: "#alt_example_3_alt",
+	altFieldTimeOnly: false,
+	altFormat: "yy-mm-dd",
+	altTimeFormat: "h:m t",
+	altSeparator: " @ "
+});
+
+
+ + +
+

With inline mode using altField:

+
+ + +
+
+$('#alt_example_4').datetimepicker({
+	altField: "#alt_example_4_alt",
+	altFieldTimeOnly: false
+});
+
+
+ +

Time Restraints

+ + +
+

Set the min/max hour of every date:

+
+ +
+
+$('#rest_example_1').timepicker({
+	hourMin: 8,
+	hourMax: 16
+});
+
+
+ + +
+

Set the min/max date numerically:

+
+ +
+
+$('#rest_example_2').datetimepicker({
+	numberOfMonths: 2,
+	minDate: 0,
+	maxDate: 30
+});
+
+
+ + +
+

Set the min/max date and time with a Date object:

+
+ +
+
+$('#rest_example_3').datetimepicker({
+	minDate: new Date(2010, 11, 20, 8, 30),
+	maxDate: new Date(2010, 11, 31, 17, 30)
+});
+
+
+ + +
+

Restrict a start and end date by using onSelect and onClose events for more control over functionality:

+

For more examples and advanced usage grab the Handling Time eBook.

+
+ + +
+
+var startDateTextBox = $('#rest_example_4_start');
+var endDateTextBox = $('#rest_example_4_end');
+
+startDateTextBox.datetimepicker({ 
+	timeFormat: 'HH:mm z',
+	onClose: function(dateText, inst) {
+		if (endDateTextBox.val() != '') {
+			var testStartDate = startDateTextBox.datetimepicker('getDate');
+			var testEndDate = endDateTextBox.datetimepicker('getDate');
+			if (testStartDate > testEndDate)
+				endDateTextBox.datetimepicker('setDate', testStartDate);
+		}
+		else {
+			endDateTextBox.val(dateText);
+		}
+	},
+	onSelect: function (selectedDateTime){
+		endDateTextBox.datetimepicker('option', 'minDate', startDateTextBox.datetimepicker('getDate') );
+	}
+});
+endDateTextBox.datetimepicker({ 
+	timeFormat: 'HH:mm z',
+	onClose: function(dateText, inst) {
+		if (startDateTextBox.val() != '') {
+			var testStartDate = startDateTextBox.datetimepicker('getDate');
+			var testEndDate = endDateTextBox.datetimepicker('getDate');
+			if (testStartDate > testEndDate)
+				startDateTextBox.datetimepicker('setDate', testEndDate);
+		}
+		else {
+			startDateTextBox.val(dateText);
+		}
+	},
+	onSelect: function (selectedDateTime){
+		startDateTextBox.datetimepicker('option', 'maxDate', endDateTextBox.datetimepicker('getDate') );
+	}
+});
+
+
+ +

Utilities

+ + +
+

Get and Set Datetime with the getDate and setDate methods. This example uses timezone to demonstrate the timepicker regonizes the timezones and computes the offsets when getting and setting.

+
+ + + +
+ +
+var ex13 = $('#utility_example_1');
+
+ex13.datetimepicker({
+	timeFormat: 'hh:mm tt z',
+	separator: ' @ ',
+	showTimezone: true
+});
+
+$('#utility_example_1_setdt').click(function(){
+	ex13.datetimepicker('setDate', (new Date()) );
+});
+
+$('#utility_example_1_getdt').click(function(){
+	alert(ex13.datetimepicker('getDate'));
+});
+
+
+ + +
+

Use the utility function to format your own time. $.datepicker.formatTime(format, time, options)

+
+
format
required - string represenation of the time format to use
+
time
required - hash: { hour, minute, second, millisecond, timezone }
+
options
optional - hash of any options in regional translation (ampm, amNames, pmNames..)
+
+

Returns a time string in the specified format.

+
+
+
+ +
+$('#utility_example_2').text(
+	$.datepicker.formatTime('HH:mm z', { hour: 14, minute: 36, timezone: '+2000' }, {})
+);
+
+
+ + +
+

Use the utility function to parses a formatted time. $.datepicker.parseTime(format, timeString, options)

+
+
format
required - string represenation of the time format to use
+
time
required - time string matching the format given in parameter 1
+
options
optional - hash of any options in regional translation (ampm, amNames, pmNames..)
+
+

Returns an object with hours, minutes, seconds, milliseconds, timezone.

+
+
+
+ +
+$('#utility_example_3').text(JSON.stringify( 
+	$.datepicker.parseTime('HH:mm:ss:l z', "14:36:21:765 +2000", {}) 
+));
+
+
+ +
+
+ + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/javascripts/jquery-timepicker-addon/dist/jquery-ui-sliderAccess.js b/public/javascripts/jquery-timepicker-addon/dist/jquery-ui-sliderAccess.js new file mode 100644 index 0000000..b075c66 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/jquery-ui-sliderAccess.js @@ -0,0 +1,91 @@ +/* + * jQuery UI Slider Access + * By: Trent Richardson [http://trentrichardson.com] + * Version 0.3 + * Last Modified: 10/20/2012 + * + * Copyright 2011 Trent Richardson + * Dual licensed under the MIT and GPL licenses. + * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt + * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt + * + */ + (function($){ + + $.fn.extend({ + sliderAccess: function(options){ + options = options || {}; + options.touchonly = options.touchonly !== undefined? options.touchonly : true; // by default only show it if touch device + + if(options.touchonly === true && !("ontouchend" in document)){ + return $(this); + } + + return $(this).each(function(i,obj){ + var $t = $(this), + o = $.extend({},{ + where: 'after', + step: $t.slider('option','step'), + upIcon: 'ui-icon-plus', + downIcon: 'ui-icon-minus', + text: false, + upText: '+', + downText: '-', + buttonset: true, + buttonsetTag: 'span', + isRTL: false + }, options), + $buttons = $('<'+ o.buttonsetTag +' class="ui-slider-access">'+ + ''+ + ''+ + ''); + + $buttons.children('button').each(function(j, jobj){ + var $jt = $(this); + $jt.button({ + text: o.text, + icons: { primary: $jt.data('icon') } + }) + .click(function(e){ + var step = $jt.data('step'), + curr = $t.slider('value'), + newval = curr += step*1, + minval = $t.slider('option','min'), + maxval = $t.slider('option','max'), + slidee = $t.slider("option", "slide") || function(){}, + stope = $t.slider("option", "stop") || function(){}; + + e.preventDefault(); + + if(newval < minval || newval > maxval){ + return; + } + + $t.slider('value', newval); + + slidee.call($t, null, { value: newval }); + stope.call($t, null, { value: newval }); + }); + }); + + // before or after + $t[o.where]($buttons); + + if(o.buttonset){ + $buttons.removeClass('ui-corner-right').removeClass('ui-corner-left').buttonset(); + $buttons.eq(0).addClass('ui-corner-left'); + $buttons.eq(1).addClass('ui-corner-right'); + } + + // adjust the width so we don't break the original layout + var bOuterWidth = $buttons.css({ + marginLeft: ((o.where === 'after' && !o.isRTL) || (o.where === 'before' && o.isRTL)? 10:0), + marginRight: ((o.where === 'before' && !o.isRTL) || (o.where === 'after' && o.isRTL)? 10:0) + }).outerWidth(true) + 5; + var tOuterWidth = $t.outerWidth(true); + $t.css('display','inline-block').width(tOuterWidth-bOuterWidth); + }); + } + }); + +})(jQuery); \ No newline at end of file diff --git a/public/javascripts/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.css b/public/javascripts/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.css new file mode 100644 index 0000000..da12d98 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.css @@ -0,0 +1,11 @@ +.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; } +.ui-timepicker-div dl { text-align: left; } +.ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; } +.ui-timepicker-div dl dd { margin: 0 10px 10px 40%; } +.ui-timepicker-div td { font-size: 90%; } +.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; } + +.ui-timepicker-rtl{ direction: rtl; } +.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; } +.ui-timepicker-rtl dl dt{ float: right; clear: right; } +.ui-timepicker-rtl dl dd { margin: 0 40% 10px 10px; } \ No newline at end of file diff --git a/public/javascripts/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.js b/public/javascripts/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.js new file mode 100644 index 0000000..31efb71 --- /dev/null +++ b/public/javascripts/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.js @@ -0,0 +1,2197 @@ +/*! jQuery Timepicker Addon - v1.4.4 - 2014-03-29 +* http://trentrichardson.com/examples/timepicker +* Copyright (c) 2014 Trent Richardson; Licensed MIT */ +(function ($) { + + /* + * Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum call stack size exceeded" + */ + $.ui.timepicker = $.ui.timepicker || {}; + if ($.ui.timepicker.version) { + return; + } + + /* + * Extend jQueryUI, get it started with our version number + */ + $.extend($.ui, { + timepicker: { + version: "1.4.4" + } + }); + + /* + * Timepicker manager. + * Use the singleton instance of this class, $.timepicker, to interact with the time picker. + * Settings for (groups of) time pickers are maintained in an instance object, + * allowing multiple different settings on the same page. + */ + var Timepicker = function () { + this.regional = []; // Available regional settings, indexed by language code + this.regional[''] = { // Default regional settings + currentText: 'Now', + closeText: 'Done', + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + timeFormat: 'HH:mm', + timeSuffix: '', + timeOnlyTitle: 'Choose Time', + timeText: 'Time', + hourText: 'Hour', + minuteText: 'Minute', + secondText: 'Second', + millisecText: 'Millisecond', + microsecText: 'Microsecond', + timezoneText: 'Time Zone', + isRTL: false + }; + this._defaults = { // Global defaults for all the datetime picker instances + showButtonPanel: true, + timeOnly: false, + timeOnlyShowDate: false, + showHour: null, + showMinute: null, + showSecond: null, + showMillisec: null, + showMicrosec: null, + showTimezone: null, + showTime: true, + stepHour: 1, + stepMinute: 1, + stepSecond: 1, + stepMillisec: 1, + stepMicrosec: 1, + hour: 0, + minute: 0, + second: 0, + millisec: 0, + microsec: 0, + timezone: null, + hourMin: 0, + minuteMin: 0, + secondMin: 0, + millisecMin: 0, + microsecMin: 0, + hourMax: 23, + minuteMax: 59, + secondMax: 59, + millisecMax: 999, + microsecMax: 999, + minDateTime: null, + maxDateTime: null, + maxTime: null, + minTime: null, + onSelect: null, + hourGrid: 0, + minuteGrid: 0, + secondGrid: 0, + millisecGrid: 0, + microsecGrid: 0, + alwaysSetTime: true, + separator: ' ', + altFieldTimeOnly: true, + altTimeFormat: null, + altSeparator: null, + altTimeSuffix: null, + pickerTimeFormat: null, + pickerTimeSuffix: null, + showTimepicker: true, + timezoneList: null, + addSliderAccess: false, + sliderAccessArgs: null, + controlType: 'slider', + defaultValue: null, + parse: 'strict' + }; + $.extend(this._defaults, this.regional['']); + }; + + $.extend(Timepicker.prototype, { + $input: null, + $altInput: null, + $timeObj: null, + inst: null, + hour_slider: null, + minute_slider: null, + second_slider: null, + millisec_slider: null, + microsec_slider: null, + timezone_select: null, + maxTime: null, + minTime: null, + hour: 0, + minute: 0, + second: 0, + millisec: 0, + microsec: 0, + timezone: null, + hourMinOriginal: null, + minuteMinOriginal: null, + secondMinOriginal: null, + millisecMinOriginal: null, + microsecMinOriginal: null, + hourMaxOriginal: null, + minuteMaxOriginal: null, + secondMaxOriginal: null, + millisecMaxOriginal: null, + microsecMaxOriginal: null, + ampm: '', + formattedDate: '', + formattedTime: '', + formattedDateTime: '', + timezoneList: null, + units: ['hour', 'minute', 'second', 'millisec', 'microsec'], + support: {}, + control: null, + + /* + * Override the default settings for all instances of the time picker. + * @param {Object} settings object - the new settings to use as defaults (anonymous object) + * @return {Object} the manager object + */ + setDefaults: function (settings) { + extendRemove(this._defaults, settings || {}); + return this; + }, + + /* + * Create a new Timepicker instance + */ + _newInst: function ($input, opts) { + var tp_inst = new Timepicker(), + inlineSettings = {}, + fns = {}, + overrides, i; + + for (var attrName in this._defaults) { + if (this._defaults.hasOwnProperty(attrName)) { + var attrValue = $input.attr('time:' + attrName); + if (attrValue) { + try { + inlineSettings[attrName] = eval(attrValue); + } catch (err) { + inlineSettings[attrName] = attrValue; + } + } + } + } + + overrides = { + beforeShow: function (input, dp_inst) { + if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) { + return tp_inst._defaults.evnts.beforeShow.call($input[0], input, dp_inst, tp_inst); + } + }, + onChangeMonthYear: function (year, month, dp_inst) { + // Update the time as well : this prevents the time from disappearing from the $input field. + tp_inst._updateDateTime(dp_inst); + if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) { + tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst); + } + }, + onClose: function (dateText, dp_inst) { + if (tp_inst.timeDefined === true && $input.val() !== '') { + tp_inst._updateDateTime(dp_inst); + } + if ($.isFunction(tp_inst._defaults.evnts.onClose)) { + tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst, tp_inst); + } + } + }; + for (i in overrides) { + if (overrides.hasOwnProperty(i)) { + fns[i] = opts[i] || null; + } + } + + tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, opts, overrides, { + evnts: fns, + timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker'); + }); + tp_inst.amNames = $.map(tp_inst._defaults.amNames, function (val) { + return val.toUpperCase(); + }); + tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function (val) { + return val.toUpperCase(); + }); + + // detect which units are supported + tp_inst.support = detectSupport( + tp_inst._defaults.timeFormat + + (tp_inst._defaults.pickerTimeFormat ? tp_inst._defaults.pickerTimeFormat : '') + + (tp_inst._defaults.altTimeFormat ? tp_inst._defaults.altTimeFormat : '')); + + // controlType is string - key to our this._controls + if (typeof(tp_inst._defaults.controlType) === 'string') { + if (tp_inst._defaults.controlType === 'slider' && typeof($.ui.slider) === 'undefined') { + tp_inst._defaults.controlType = 'select'; + } + tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType]; + } + // controlType is an object and must implement create, options, value methods + else { + tp_inst.control = tp_inst._defaults.controlType; + } + + // prep the timezone options + var timezoneList = [-720, -660, -600, -570, -540, -480, -420, -360, -300, -270, -240, -210, -180, -120, -60, + 0, 60, 120, 180, 210, 240, 270, 300, 330, 345, 360, 390, 420, 480, 525, 540, 570, 600, 630, 660, 690, 720, 765, 780, 840]; + if (tp_inst._defaults.timezoneList !== null) { + timezoneList = tp_inst._defaults.timezoneList; + } + var tzl = timezoneList.length, tzi = 0, tzv = null; + if (tzl > 0 && typeof timezoneList[0] !== 'object') { + for (; tzi < tzl; tzi++) { + tzv = timezoneList[tzi]; + timezoneList[tzi] = { value: tzv, label: $.timepicker.timezoneOffsetString(tzv, tp_inst.support.iso8601) }; + } + } + tp_inst._defaults.timezoneList = timezoneList; + + // set the default units + tp_inst.timezone = tp_inst._defaults.timezone !== null ? $.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone) : + ((new Date()).getTimezoneOffset() * -1); + tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin ? tp_inst._defaults.hourMin : + tp_inst._defaults.hour > tp_inst._defaults.hourMax ? tp_inst._defaults.hourMax : tp_inst._defaults.hour; + tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin ? tp_inst._defaults.minuteMin : + tp_inst._defaults.minute > tp_inst._defaults.minuteMax ? tp_inst._defaults.minuteMax : tp_inst._defaults.minute; + tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin ? tp_inst._defaults.secondMin : + tp_inst._defaults.second > tp_inst._defaults.secondMax ? tp_inst._defaults.secondMax : tp_inst._defaults.second; + tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin ? tp_inst._defaults.millisecMin : + tp_inst._defaults.millisec > tp_inst._defaults.millisecMax ? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec; + tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin ? tp_inst._defaults.microsecMin : + tp_inst._defaults.microsec > tp_inst._defaults.microsecMax ? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec; + tp_inst.ampm = ''; + tp_inst.$input = $input; + + if (tp_inst._defaults.altField) { + tp_inst.$altInput = $(tp_inst._defaults.altField).css({ + cursor: 'pointer' + }).focus(function () { + $input.trigger("focus"); + }); + } + + if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) { + tp_inst._defaults.minDate = new Date(); + } + if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) { + tp_inst._defaults.maxDate = new Date(); + } + + // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime.. + if (tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) { + tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime()); + } + if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) { + tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime()); + } + if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) { + tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime()); + } + if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) { + tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime()); + } + tp_inst.$input.bind('focus', function () { + tp_inst._onFocus(); + }); + + return tp_inst; + }, + + /* + * add our sliders to the calendar + */ + _addTimePicker: function (dp_inst) { + var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val(); + + this.timeDefined = this._parseTime(currDT); + this._limitMinMaxDateTime(dp_inst, false); + this._injectTimePicker(); + }, + + /* + * parse the time string from input value or _setTime + */ + _parseTime: function (timeString, withDate) { + if (!this.inst) { + this.inst = $.datepicker._getInst(this.$input[0]); + } + + if (withDate || !this._defaults.timeOnly) { + var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat'); + try { + var parseRes = parseDateTimeInternal(dp_dateFormat, this._defaults.timeFormat, timeString, $.datepicker._getFormatConfig(this.inst), this._defaults); + if (!parseRes.timeObj) { + return false; + } + $.extend(this, parseRes.timeObj); + } catch (err) { + $.timepicker.log("Error parsing the date/time string: " + err + + "\ndate/time string = " + timeString + + "\ntimeFormat = " + this._defaults.timeFormat + + "\ndateFormat = " + dp_dateFormat); + return false; + } + return true; + } else { + var timeObj = $.datepicker.parseTime(this._defaults.timeFormat, timeString, this._defaults); + if (!timeObj) { + return false; + } + $.extend(this, timeObj); + return true; + } + }, + + /* + * generate and inject html for timepicker into ui datepicker + */ + _injectTimePicker: function () { + var $dp = this.inst.dpDiv, + o = this.inst.settings, + tp_inst = this, + litem = '', + uitem = '', + show = null, + max = {}, + gridSize = {}, + size = null, + i = 0, + l = 0; + + // Prevent displaying twice + if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) { + var noDisplay = ' style="display:none;"', + html = '
' + '
' + o.timeText + '
' + + '
'; + + // Create the markup + for (i = 0, l = this.units.length; i < l; i++) { + litem = this.units[i]; + uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1); + show = o['show' + uitem] !== null ? o['show' + uitem] : this.support[litem]; + + // Added by Peter Medeiros: + // - Figure out what the hour/minute/second max should be based on the step values. + // - Example: if stepMinute is 15, then minMax is 45. + max[litem] = parseInt((o[litem + 'Max'] - ((o[litem + 'Max'] - o[litem + 'Min']) % o['step' + uitem])), 10); + gridSize[litem] = 0; + + html += '
' + o[litem + 'Text'] + '
' + + '
'; + + if (show && o[litem + 'Grid'] > 0) { + html += '
'; + + if (litem === 'hour') { + for (var h = o[litem + 'Min']; h <= max[litem]; h += parseInt(o[litem + 'Grid'], 10)) { + gridSize[litem]++; + var tmph = $.datepicker.formatTime(this.support.ampm ? 'hht' : 'HH', {hour: h}, o); + html += ''; + } + } + else { + for (var m = o[litem + 'Min']; m <= max[litem]; m += parseInt(o[litem + 'Grid'], 10)) { + gridSize[litem]++; + html += ''; + } + } + + html += '
' + tmph + '' + ((m < 10) ? '0' : '') + m + '
'; + } + html += '
'; + } + + // Timezone + var showTz = o.showTimezone !== null ? o.showTimezone : this.support.timezone; + html += '
' + o.timezoneText + '
'; + html += '
'; + + // Create the elements from string + html += '
'; + var $tp = $(html); + + // if we only want time picker... + if (o.timeOnly === true) { + $tp.prepend('
' + '
' + o.timeOnlyTitle + '
' + '
'); + $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide(); + } + + // add sliders, adjust grids, add events + for (i = 0, l = tp_inst.units.length; i < l; i++) { + litem = tp_inst.units[i]; + uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1); + show = o['show' + uitem] !== null ? o['show' + uitem] : this.support[litem]; + + // add the slider + tp_inst[litem + '_slider'] = tp_inst.control.create(tp_inst, $tp.find('.ui_tpicker_' + litem + '_slider'), litem, tp_inst[litem], o[litem + 'Min'], max[litem], o['step' + uitem]); + + // adjust the grid and add click event + if (show && o[litem + 'Grid'] > 0) { + size = 100 * gridSize[litem] * o[litem + 'Grid'] / (max[litem] - o[litem + 'Min']); + $tp.find('.ui_tpicker_' + litem + ' table').css({ + width: size + "%", + marginLeft: o.isRTL ? '0' : ((size / (-2 * gridSize[litem])) + "%"), + marginRight: o.isRTL ? ((size / (-2 * gridSize[litem])) + "%") : '0', + borderCollapse: 'collapse' + }).find("td").click(function (e) { + var $t = $(this), + h = $t.html(), + n = parseInt(h.replace(/[^0-9]/g), 10), + ap = h.replace(/[^apm]/ig), + f = $t.data('for'); // loses scope, so we use data-for + + if (f === 'hour') { + if (ap.indexOf('p') !== -1 && n < 12) { + n += 12; + } + else { + if (ap.indexOf('a') !== -1 && n === 12) { + n = 0; + } + } + } + + tp_inst.control.value(tp_inst, tp_inst[f + '_slider'], litem, n); + + tp_inst._onTimeChange(); + tp_inst._onSelectHandler(); + }).css({ + cursor: 'pointer', + width: (100 / gridSize[litem]) + '%', + textAlign: 'center', + overflow: 'hidden' + }); + } // end if grid > 0 + } // end for loop + + // Add timezone options + this.timezone_select = $tp.find('.ui_tpicker_timezone').append('').find("select"); + $.fn.append.apply(this.timezone_select, + $.map(o.timezoneList, function (val, idx) { + return $("