diff options
author | Trent Richardson <trentdrichardson@gmail.com> | 2012-10-02 15:31:03 -0400 |
---|---|---|
committer | Trent Richardson <trentdrichardson@gmail.com> | 2012-10-02 15:31:03 -0400 |
commit | f908d499dcdc042976dd14e5d446fddc403e9056 (patch) | |
tree | f14078c75ab580fab28594cde16418129146edf8 | |
parent | 038bfc2b942bf36e3a457576c130a900c9c9fe57 (diff) | |
download | jQuery-Timepicker-Addon-f908d499dcdc042976dd14e5d446fddc403e9056.zip jQuery-Timepicker-Addon-f908d499dcdc042976dd14e5d446fddc403e9056.tar.gz jQuery-Timepicker-Addon-f908d499dcdc042976dd14e5d446fddc403e9056.tar.bz2 |
Documentation update
-rw-r--r-- | index.html | 2 | ||||
-rw-r--r-- | jquery-ui-timepicker-addon.js | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -605,7 +605,7 @@ $('#slider_example_3').datetimepicker({ <!-- ============= example --> <div class="example-container"> - <p>Use dropdowns instead of sliders</p> + <p>Use dropdowns instead of sliders. By default if slider is not available dropdowns will be used.</p> <div> <input type="text" name="slider_example_4" id="slider_example_4" value="" /> </div> diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 1511553..5fb7898 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -834,8 +834,10 @@ /*
* Small abstraction to control types
+ * We can add more, just be sure to follow the pattern: create, options, value
*/
_controls: {
+ // slider methods
slider: {
create: function(tp_inst, obj, unit, val, min, max, step){
return obj.prop('slide', null).slider({
@@ -864,6 +866,7 @@ return obj.slider('value');
}
},
+ // select methods
select: {
create: function(tp_inst, obj, unit, val, min, max, step){
var sel = '<select class="ui-timepicker-select" data-unit="'+ unit +'" data-min="'+ min +'" data-max="'+ max +'" data-step="'+ step +'">',
@@ -894,8 +897,7 @@ },
options: function(tp_inst, obj, opts, val){
var o = {},
- $t = obj.find('select');
-
+ $t = obj.children('select');
if(typeof(opts) == 'string'){
if(val == undefined)
return $t.data(opts);
@@ -911,7 +913,7 @@ return $t.val();
}
}
- }
+ } // end _controls
});
|