fgelinas / timepicker

A jQuery UI Time Picker
http://fgelinas.com/code/timepicker
GNU General Public License v2.0
266 stars 84 forks source link

what is about dynamic input from json data #74

Closed Terrahe closed 11 years ago

Terrahe commented 11 years ago

hi there, i much appreciate this time selection tool,

working with angularjs i try to populate the time-input box with json-data, for example: 12:15

but this is not shown in input and not processing in timepickers logic

i would implement it formyself, but where to start????

many thanks marc

fgelinas commented 11 years ago

Hi, Do you have a working example of the problem? Normally, if you put a valid time in the input field prior to showing the timepicker, it will parse that time for display. Also, check for js errors?

Terrahe commented 11 years ago

hi , i uploaded the app

cheers marc

fgelinas commented 11 years ago

Hi, I am not sure exactly where the problem is on your page but messing around I got this javascript error that seems to cause your problem : Error: Syntax Error: Token ':' is an unexpected token at column 3 of the expression [15:35] starting at [:35].

Terrahe commented 11 years ago

thank you, i find the issue in the angular directive i wrote so for further assistance this is a working directive:

app.directive('timepicker', function() { return { restrict: 'A', require: 'ngModel', link: function(scope, element, attrs){ element.timepicker({ onClose: function(dateText) { scope.field=dateText; } }) } } });