Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed the start-end time example for when a boundary value is empty.

  • Loading branch information...
commit 627aefd1d93fdae67fd76b2bf403f013b01c8457 1 parent e61baa8
@fgelinas authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 index.html
View
8 index.html
@@ -561,6 +561,8 @@
function tpStartOnHourShowCallback(hour) {
var tpEndHour = $('#timepicker_end').timepicker('getHour');
+ // all valid if no end time selected
+ if ($('#timepicker_end').val() == '') { return true; }
// Check if proposed hour is prior or equal to selected end time hour
if (hour <= tpEndHour) { return true; }
// if hour did not match, it can not be selected
@@ -569,6 +571,8 @@
function tpStartOnMinuteShowCallback(hour, minute) {
var tpEndHour = $('#timepicker_end').timepicker('getHour');
var tpEndMinute = $('#timepicker_end').timepicker('getMinute');
+ // all valid if no end time selected
+ if ($('#timepicker_end').val() == '') { return true; }
// Check if proposed hour is prior to selected end time hour
if (hour < tpEndHour) { return true; }
// Check if proposed hour is equal to selected end time hour and minutes is prior
@@ -579,6 +583,8 @@
function tpEndOnHourShowCallback(hour) {
var tpStartHour = $('#timepicker_start').timepicker('getHour');
+ // all valid if no start time selected
+ if ($('#timepicker_start').val() == '') { return true; }
// Check if proposed hour is after or equal to selected start time hour
if (hour >= tpStartHour) { return true; }
// if hour did not match, it can not be selected
@@ -587,6 +593,8 @@
function tpEndOnMinuteShowCallback(hour, minute) {
var tpStartHour = $('#timepicker_start').timepicker('getHour');
var tpStartMinute = $('#timepicker_start').timepicker('getMinute');
+ // all valid if no start time selected
+ if ($('#timepicker_start').val() == '') { return true; }
// Check if proposed hour is after selected start time hour
if (hour > tpStartHour) { return true; }
// Check if proposed hour is equal to selected start time hour and minutes is after
Please sign in to comment.
Something went wrong with that request. Please try again.