Categorized | Web 2.0

NoGray Visual Time Picker

The NoGray Time Picker is a component that lets you add a time picker that is visual. The clock shows up, and you move the hands to wherever you need to be. All via a simple:

JAVASCRIPT:
  1.  
  2. var tp = new TimePicker('time2_picker', 'time2', 'time2_toggler', {format24:true});
  3.  

Or a more complex version that tracks the changes:

JAVASCRIPT:
  1.  
  2. var tp = new TimePicker('time_picker', null, null, {onChange:function(){
  3.                                           if (this.time.hour <12) var ampm = this.options.lang.am;
  4.                                           else var ampm = this.options.lang.pm;
  5.  
  6.                                           var hour = this.time.hour%12;
  7.                                           if (hour <10) hour = "0"+hour;
  8.                                           var minute = this.time.minute;
  9.                                           if (minute <10) minute = "0"+minute;
  10.                                           $('time3_value').setHTML(hour+":"+minute+" "+ampm);
  11. } });
  12.  

After all that though, is it easier than asking to put in the time?