diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js
index 4274950a..2ab9525b 100644
--- a/jquery-ui-timepicker-addon.js
+++ b/jquery-ui-timepicker-addon.js
@@ -265,9 +265,9 @@ $.extend(Timepicker.prototype, {
// 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.
- hourMax = (o.hourMax - (o.hourMax % o.stepHour)).toFixed(0),
- minMax = (o.minuteMax - (o.minuteMax % o.stepMinute)).toFixed(0),
- secMax = (o.secondMax - (o.secondMax % o.stepSecond)).toFixed(0),
+ hourMax = (o.hourMax - ((o.hourMax - o.hourMin) % o.stepHour)).toFixed(0),
+ minMax = (o.minuteMax - ((o.minuteMax - o.minuteMin) % o.stepMinute)).toFixed(0),
+ secMax = (o.secondMax - ((o.secondMax - o.secondMin) % o.stepSecond)).toFixed(0),
dp_id = this.inst.id.toString().replace(/([^A-Za-z0-9_])/g, '');
// Prevent displaying twice
@@ -285,7 +285,7 @@ $.extend(Timepicker.prototype, {
minuteGridSize = 0,
secondGridSize = 0,
size;
-
+
if (o.showHour && o.hourGrid > 0) {
html += '
' +
'' +
@@ -586,9 +586,9 @@ $.extend(Timepicker.prototype, {
}
if(adjustSliders !== undefined && adjustSliders === true){
- var hourMax = (this._defaults.hourMax - (this._defaults.hourMax % this._defaults.stepHour)).toFixed(0),
- minMax = (this._defaults.minuteMax - (this._defaults.minuteMax % this._defaults.stepMinute)).toFixed(0),
- secMax = (this._defaults.secondMax - (this._defaults.secondMax % this._defaults.stepSecond)).toFixed(0);
+ var hourMax = (this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)).toFixed(0),
+ minMax = (this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)).toFixed(0),
+ secMax = (this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)).toFixed(0);
if(this.hour_slider)
this.hour_slider.slider("option", { min: this._defaults.hourMin, max: hourMax }).slider('value', this.hour);
diff --git a/localization/jquery-ui-timepicker-sk.js b/localization/jquery-ui-timepicker-sk.js
new file mode 100644
index 00000000..1d55027c
--- /dev/null
+++ b/localization/jquery-ui-timepicker-sk.js
@@ -0,0 +1,19 @@
+/* Slovak translation for the jQuery Timepicker Addon */
+/* Written by Andrea Pavolková */
+(function($) {
+ $.timepicker.regional['sk'] = {
+ timeOnlyTitle: 'Vyberte čas',
+ timeText: 'Čas',
+ hourText: 'Hodiny',
+ minuteText: 'Minúty',
+ secondText: 'Sekundy',
+ timezoneText: 'Časové pásmo',
+ currentText: 'Teraz',
+ closeText: 'Zavrieť',
+ timeFormat: 'h:m',
+ ampm: false,
+ am: 'dop.',
+ pm: 'odp.'
+ };
+ $.timepicker.setDefaults($.timepicker.regional['sk']);
+})(jQuery);
\ No newline at end of file