Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Making parseTime "safe" if an undefined timeVal is passed #57

Merged
merged 1 commit into from

2 participants

@KevinOrtman

Hi Frank,
Timepicker rocks. Thank you for creating this VERY useful widget. I'm working on an AngularJS (http://angularjs.org/) directive wrapper for timepicker and discovered the parseTime() method throws an exception when passed an undefined timeVal.

Hope this helps,
Kevin

@fgelinas
Owner

Looks good, thank you Kevin!

@fgelinas fgelinas merged commit 7b06d33 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  jquery.ui.timepicker.js
View
3  jquery.ui.timepicker.js
@@ -1140,6 +1140,9 @@
var retVal = new Object();
retVal.hours = -1;
retVal.minutes = -1;
+
+ if(!timeVal)
+ return '';
var timeSeparator = this._get(inst, 'timeSeparator'),
amPmText = this._get(inst, 'amPmText'),
Something went wrong with that request. Please try again.