diff --git a/bower.json b/bower.json
index 57c3ffa..e9fc58b 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "nan-timepicker",
- "version": "0.1.2",
+ "version": "0.1.3",
"main": "dist/nan-timepicker.js",
"ignore": [
"**/.*",
diff --git a/dist/nan-timepicker.js b/dist/nan-timepicker.js
index 6dd81e6..d3ece9f 100644
--- a/dist/nan-timepicker.js
+++ b/dist/nan-timepicker.js
@@ -193,6 +193,10 @@
return self;
},
+ get: function() {
+ return $(this);
+ },
+
getSecondsFromMidnight: function() {
return _time2int(_getTimeValue(this));
},
diff --git a/dist/nan-timepicker.min.js b/dist/nan-timepicker.min.js
index e56bbdf..fa8db21 100644
--- a/dist/nan-timepicker.min.js
+++ b/dist/nan-timepicker.min.js
@@ -1,7 +1,7 @@
/**
- * nan-timepicker.js 0.1.2
+ * nan-timepicker.js 0.1.3
* https://github.com/nanlabs/nan-timepicker
- * Date Compiled: 2013-09-30
+ * Date Compiled: 2014-01-24
* */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(){return new Date(1970,1,1,0,0,0)}function c(a,b){return a[0]-b[0]}function d(a){if(a.minTime&&(a.minTime=s(a.minTime)),a.maxTime&&(a.maxTime=s(a.maxTime)),a.durationTime&&"function"!=typeof a.durationTime&&(a.durationTime=s(a.durationTime)),a.disableTimeRanges.length>0){for(var b in a.disableTimeRanges)a.disableTimeRanges[b]=[s(a.disableTimeRanges[b][0]),s(a.disableTimeRanges[b][1])];a.disableTimeRanges=a.disableTimeRanges.sort(c)}if(a.timeRanges.length>0)for(var d in a.timeRanges){var e=a.timeRanges[d];e.className=e.className||"",e.disabled="undefined"!==e.disabled?e.disabled:!1,e.ranges=e.ranges||[];for(var f in e.ranges)e.ranges[f]=[s(e.ranges[f][0]),s(e.ranges[f][1])];e.ranges=e.ranges.sort(c)}return a}function e(b){var c=b.data("timepicker-settings"),d=b.data("timepicker-list");d&&d.length&&(d.remove(),b.data("timepicker-list",!1)),d=a("
",{"class":"ui-timepicker-list"});var e=a("",{"class":"ui-timepicker-wrapper",tabindex:-1});e.css({display:"none",position:"absolute"}).append(d),c.className&&e.addClass(c.className),null===c.minTime&&null===c.durationTime||!c.showDuration||e.addClass("ui-timepicker-with-duration");var f=c.minTime;"function"==typeof c.durationTime?f=s(c.durationTime()):null!==c.durationTime&&(f=c.durationTime);var g=null!==c.minTime?c.minTime:0,h=null!==c.maxTime?c.maxTime:g+w-1;g>=h&&(h+=w);for(var j=c.disableTimeRanges,k=0,l=j.length,m=c.timeRanges,n=g;h>=n;n+=60*c.step){var o=n%w,t=a("");if(t.data("time",o),t.text(r(o,c.timeFormat)),(null!==c.minTime||null!==c.durationTime)&&c.showDuration){var u=a("");u.addClass("ui-timepicker-duration"),u.text(" ("+q(n-f)+")"),t.append(u)}l>k&&(o>=j[k][1]&&(k+=1),j[k]&&o>=j[k][0]&&oC;C++)if(B[C]&&o>=B[C][0]&&o').append(c.legend);e.append(F)}}function f(b){"ontouchstart"in document?a("body").on("touchstart.ui-timepicker",g):(a("body").on("mousedown.ui-timepicker",g),b.closeOnWindowScroll&&a(window).on("scroll.ui-timepicker",g))}function g(b){var c=a(b.target),d=c.closest(".ui-timepicker-input");0===d.length&&0===c.closest(".ui-timepicker-wrapper").length&&(z.hide(),a("body").unbind(".ui-timepicker"),a(window).unbind(".ui-timepicker"))}function h(b,c,d){if(!d&&0!==d)return!1;var e=b.data("timepicker-settings"),f=!1,g=30*e.step;return c.find("li").each(function(b,c){var e=a(c),h=e.data("time")-d;return Math.abs(h)b.outerHeight()||0>e)&&b.scrollTop(b.scrollTop()+d.position().top-d.outerHeight()),d.addClass("ui-timepicker-selected")}}}function j(){if(""!==this.value){var b=a(this),c=s(this.value);if(null===c)return b.trigger("timeFormatError"),void 0;var d=b.data("timepicker-settings");null!==d.minTime&&cd.maxTime&&b.trigger("timeRangeError"),a.each(d.disableTimeRanges,function(){return c>=this[0]&&c=h[0]&&c=30*d.step?c+=60*d.step-i:c-=i}var j=r(c,d.timeFormat);l(b,j)}}function k(a){return a.is("input")?a.val():a.data("ui-timepicker-value")}function l(a,b){a.is("input")?a.val(b):a.data("ui-timepicker-value",b)}function m(b){var c=a(this),d=c.data("timepicker-list");if(!d||!d.is(":visible")){if(40!==b.keyCode)return n(b,c);c.focus()}switch(b.keyCode){case 13:return p(c)&&z.hide.apply(this),b.preventDefault(),!1;case 38:var e=d.find(".ui-timepicker-selected");return e.length?e.is(":first-child")||(e.removeClass("ui-timepicker-selected"),e.prev().addClass("ui-timepicker-selected"),e.prev().position().top0?(e=a(c),!1):void 0}),e.addClass("ui-timepicker-selected")),!1;case 40:return e=d.find(".ui-timepicker-selected"),0===e.length?(d.find("li").each(function(b,c){return a(c).position().top>0?(e=a(c),!1):void 0}),e.addClass("ui-timepicker-selected")):e.is(":last-child")||(e.removeClass("ui-timepicker-selected"),e.next().addClass("ui-timepicker-selected"),e.next().position().top+2*e.outerHeight()>d.outerHeight()&&d.scrollTop(d.scrollTop()+e.outerHeight())),!1;case 27:d.find("li").removeClass("ui-timepicker-selected"),d.hide();break;case 9:z.hide();break;default:return n(b,c)}}function n(a,b){return!b.data("timepicker-settings").disableTextInput||a.ctrlKey||a.altKey||a.metaKey||2!==a.keyCode&&(a.keyCode<46||a.keyCode>90)}function o(b){var c=a(this),d=c.data("timepicker-list");if(!d||!d.is(":visible"))return!0;switch(b.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:i(c,d);break;default:return}}function p(a){var b=a.data("timepicker-settings"),c=a.data("timepicker-list"),d=null,e=c.find(".ui-timepicker-selected");if(e.hasClass("ui-timepicker-disabled"))return!1;if(e.length?d=e.data("time"):k(a)&&(d=s(k(a)),i(a,c)),null!==d){var f=r(d,b.timeFormat);l(a,f)}return a.trigger("change").trigger("changeTime"),!0}function q(a){var b,c=Math.round(a/60);if(Math.abs(c)<60)b=[c,y.mins];else if(60===c)b=["1",y.hr];else{var d=(c/60).toFixed(1);"."!==y.decimal&&(d=d.replace(".",y.decimal)),b=[d,y.hrs]}return b.join(" ")}function r(a,b){if(null!==a){for(var c,d,e=new Date(v.valueOf()+1e3*a),f="",g=0;g11?"pm":"am";break;case"A":f+=e.getHours()>11?"PM":"AM";break;case"g":c=e.getHours()%12,f+=0===c?"12":c;break;case"G":f+=e.getHours();break;case"h":c=e.getHours()%12,0!==c&&10>c&&(c="0"+c),f+=0===c?"12":c;break;case"H":c=e.getHours(),f+=c>9?c:"0"+c;break;case"i":var h=e.getMinutes();f+=h>9?h:"0"+h;break;case"s":a=e.getSeconds(),f+=a>9?a:"0"+a;break;default:f+=d}return f}}function s(a){if(""===a)return null;if(!a||a+0===a)return a;"object"==typeof a&&(a=a.getHours()+":"+u(a.getMinutes())+":"+u(a.getSeconds())),a=a.toLowerCase(),new Date(0);var b;if(-1===a.indexOf(":")?(b=a.match(/^([0-9]):?([0-5][0-9])?:?([0-5][0-9])?\s*([pa]?)m?$/),b||(b=a.match(/^([0-2][0-9]):?([0-5][0-9])?:?([0-5][0-9])?\s*([pa]?)m?$/))):b=a.match(/^(\d{1,2})(?::([0-5][0-9]))?(?::([0-5][0-9]))?\s*([pa]?)m?$/),!b)return null;var c,d=parseInt(1*b[1],10);c=b[4]?12===d?"p"===b[4]?12:0:d+("p"===b[4]?12:0):d;var e=1*b[2]||0,f=1*b[3]||0;return 3600*c+60*e+f}function t(a){return a.setHours(0,0,0,0)}function u(a){return("0"+a).slice(-2)}var v=b(),w=86400,x={className:null,minTime:null,maxTime:null,durationTime:null,step:30,showDuration:!1,timeFormat:"H:i",scrollDefaultNow:!1,scrollDefaultTime:!1,selectOnBlur:!1,disableTouchKeyboard:!0,forceRoundTime:!1,appendTo:"body",disableTimeRanges:[],timeRanges:[],closeOnWindowScroll:!1,disableTextInput:!1,legend:null},y={decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},z={init:function(b){return this.each(function(){var c=a(this);if("SELECT"===c[0].tagName){for(var e={type:"text",value:c.val()},f=c[0].attributes,g=0;g",e);c.replaceWith(h),c=h}var i=a.extend({},x);b&&(i=a.extend(i,b)),i.lang&&(y=a.extend(y,i.lang)),i=d(i),c.data("timepicker-settings",i),c.prop("autocomplete","off"),c.on("click.timepicker focus.timepicker",z.show),c.on("blur.timepicker",j),c.on("keydown.timepicker",m),c.on("keyup.timepicker",o),c.addClass("ui-timepicker-input"),j.call(c.get(0))})},show:function(){var b=a(this),c=b.data("timepicker-settings");"ontouchstart"in document&&c.disableTouchKeyboard&&b.blur();var d=b.data("timepicker-list");if(d&&0!==d.length&&"function"!=typeof c.durationTime||(e(b),d=b.data("timepicker-list")),!d.is(":visible")){z.hide(),d.show(),d.offset({left:b.offset().left+parseInt(d.css("marginLeft").replace("px",""),10),top:b.offset().top+b.outerHeight()+parseInt(d.css("marginTop").replace("px",""),10)});var g=d.find(".ui-timepicker-selected");if(g.length||(k(b)?g=h(b,d,s(k(b))):c.scrollDefaultNow?g=h(b,d,s(new Date)):c.scrollDefaultTime!==!1&&(g=h(b,d,s(c.scrollDefaultTime)))),g&&g.length){var i=d.scrollTop()+g.position().top-g.outerHeight();d.scrollTop(i)}else d.scrollTop(0);f(c),b.trigger("showTimepicker")}},hide:function(){a(".ui-timepicker-wrapper:visible").each(function(){var b=a(this),c=b.data("timepicker-input"),d=c.data("timepicker-settings");d&&d.selectOnBlur&&p(c),b.hide(),c.trigger("hideTimepicker")})},option:function(b,c){var e=this,f=e.data("timepicker-settings"),g=e.data("timepicker-list");if("object"==typeof b)f=a.extend(f,b);else if("string"==typeof b&&"undefined"!=typeof c)f[b]=c;else if("string"==typeof b)return f[b];return f=d(f),e.data("timepicker-settings",f),g&&(g.remove(),e.data("timepicker-list",!1)),e},getSecondsFromMidnight:function(){return s(k(this))},getTime:function(){var a=this,b=t(new Date);return new Date(b.valueOf()+1e3*s(k(a)))},setTime:function(a){var b=this,c=r(s(a),b.data("timepicker-settings").timeFormat);l(b,c)},remove:function(){var a=this;a.hasClass("ui-timepicker-input")&&(a.removeAttr("autocomplete","off"),a.removeClass("ui-timepicker-input"),a.removeData("timepicker-settings"),a.off(".timepicker"),a.data("timepicker-list")&&a.data("timepicker-list").remove(),a.removeData("timepicker-list"))}};a.fn.timepicker=function(b){return z[b]?z[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?(a.error("Method "+b+" does not exist on nan-timepicker"),void 0):z.init.apply(this,arguments)}});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(){return new Date(1970,1,1,0,0,0)}function c(a,b){return a[0]-b[0]}function d(a){if(a.minTime&&(a.minTime=s(a.minTime)),a.maxTime&&(a.maxTime=s(a.maxTime)),a.durationTime&&"function"!=typeof a.durationTime&&(a.durationTime=s(a.durationTime)),a.disableTimeRanges.length>0){for(var b in a.disableTimeRanges)a.disableTimeRanges[b]=[s(a.disableTimeRanges[b][0]),s(a.disableTimeRanges[b][1])];a.disableTimeRanges=a.disableTimeRanges.sort(c)}if(a.timeRanges.length>0)for(var d in a.timeRanges){var e=a.timeRanges[d];e.className=e.className||"",e.disabled="undefined"!==e.disabled?e.disabled:!1,e.ranges=e.ranges||[];for(var f in e.ranges)e.ranges[f]=[s(e.ranges[f][0]),s(e.ranges[f][1])];e.ranges=e.ranges.sort(c)}return a}function e(b){var c=b.data("timepicker-settings"),d=b.data("timepicker-list");d&&d.length&&(d.remove(),b.data("timepicker-list",!1)),d=a("",{"class":"ui-timepicker-list"});var e=a("",{"class":"ui-timepicker-wrapper",tabindex:-1});e.css({display:"none",position:"absolute"}).append(d),c.className&&e.addClass(c.className),null===c.minTime&&null===c.durationTime||!c.showDuration||e.addClass("ui-timepicker-with-duration");var f=c.minTime;"function"==typeof c.durationTime?f=s(c.durationTime()):null!==c.durationTime&&(f=c.durationTime);var g=null!==c.minTime?c.minTime:0,h=null!==c.maxTime?c.maxTime:g+w-1;g>=h&&(h+=w);for(var j=c.disableTimeRanges,k=0,l=j.length,m=c.timeRanges,n=g;h>=n;n+=60*c.step){var o=n%w,t=a("");if(t.data("time",o),t.text(r(o,c.timeFormat)),(null!==c.minTime||null!==c.durationTime)&&c.showDuration){var u=a("");u.addClass("ui-timepicker-duration"),u.text(" ("+q(n-f)+")"),t.append(u)}l>k&&(o>=j[k][1]&&(k+=1),j[k]&&o>=j[k][0]&&oC;C++)if(B[C]&&o>=B[C][0]&&o').append(c.legend);e.append(F)}}function f(b){"ontouchstart"in document?a("body").on("touchstart.ui-timepicker",g):(a("body").on("mousedown.ui-timepicker",g),b.closeOnWindowScroll&&a(window).on("scroll.ui-timepicker",g))}function g(b){var c=a(b.target),d=c.closest(".ui-timepicker-input");0===d.length&&0===c.closest(".ui-timepicker-wrapper").length&&(z.hide(),a("body").unbind(".ui-timepicker"),a(window).unbind(".ui-timepicker"))}function h(b,c,d){if(!d&&0!==d)return!1;var e=b.data("timepicker-settings"),f=!1,g=30*e.step;return c.find("li").each(function(b,c){var e=a(c),h=e.data("time")-d;return Math.abs(h)b.outerHeight()||0>e)&&b.scrollTop(b.scrollTop()+d.position().top-d.outerHeight()),d.addClass("ui-timepicker-selected")}}}function j(){if(""!==this.value){var b=a(this),c=s(this.value);if(null===c)return b.trigger("timeFormatError"),void 0;var d=b.data("timepicker-settings");null!==d.minTime&&cd.maxTime&&b.trigger("timeRangeError"),a.each(d.disableTimeRanges,function(){return c>=this[0]&&c=h[0]&&c=30*d.step?c+=60*d.step-i:c-=i}var j=r(c,d.timeFormat);l(b,j)}}function k(a){return a.is("input")?a.val():a.data("ui-timepicker-value")}function l(a,b){a.is("input")?a.val(b):a.data("ui-timepicker-value",b)}function m(b){var c=a(this),d=c.data("timepicker-list");if(!d||!d.is(":visible")){if(40!==b.keyCode)return n(b,c);c.focus()}switch(b.keyCode){case 13:return p(c)&&z.hide.apply(this),b.preventDefault(),!1;case 38:var e=d.find(".ui-timepicker-selected");return e.length?e.is(":first-child")||(e.removeClass("ui-timepicker-selected"),e.prev().addClass("ui-timepicker-selected"),e.prev().position().top0?(e=a(c),!1):void 0}),e.addClass("ui-timepicker-selected")),!1;case 40:return e=d.find(".ui-timepicker-selected"),0===e.length?(d.find("li").each(function(b,c){return a(c).position().top>0?(e=a(c),!1):void 0}),e.addClass("ui-timepicker-selected")):e.is(":last-child")||(e.removeClass("ui-timepicker-selected"),e.next().addClass("ui-timepicker-selected"),e.next().position().top+2*e.outerHeight()>d.outerHeight()&&d.scrollTop(d.scrollTop()+e.outerHeight())),!1;case 27:d.find("li").removeClass("ui-timepicker-selected"),d.hide();break;case 9:z.hide();break;default:return n(b,c)}}function n(a,b){return!b.data("timepicker-settings").disableTextInput||a.ctrlKey||a.altKey||a.metaKey||2!==a.keyCode&&(a.keyCode<46||a.keyCode>90)}function o(b){var c=a(this),d=c.data("timepicker-list");if(!d||!d.is(":visible"))return!0;switch(b.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:i(c,d);break;default:return}}function p(a){var b=a.data("timepicker-settings"),c=a.data("timepicker-list"),d=null,e=c.find(".ui-timepicker-selected");if(e.hasClass("ui-timepicker-disabled"))return!1;if(e.length?d=e.data("time"):k(a)&&(d=s(k(a)),i(a,c)),null!==d){var f=r(d,b.timeFormat);l(a,f)}return a.trigger("change").trigger("changeTime"),!0}function q(a){var b,c=Math.round(a/60);if(Math.abs(c)<60)b=[c,y.mins];else if(60===c)b=["1",y.hr];else{var d=(c/60).toFixed(1);"."!==y.decimal&&(d=d.replace(".",y.decimal)),b=[d,y.hrs]}return b.join(" ")}function r(a,b){if(null!==a){for(var c,d,e=new Date(v.valueOf()+1e3*a),f="",g=0;g11?"pm":"am";break;case"A":f+=e.getHours()>11?"PM":"AM";break;case"g":c=e.getHours()%12,f+=0===c?"12":c;break;case"G":f+=e.getHours();break;case"h":c=e.getHours()%12,0!==c&&10>c&&(c="0"+c),f+=0===c?"12":c;break;case"H":c=e.getHours(),f+=c>9?c:"0"+c;break;case"i":var h=e.getMinutes();f+=h>9?h:"0"+h;break;case"s":a=e.getSeconds(),f+=a>9?a:"0"+a;break;default:f+=d}return f}}function s(a){if(""===a)return null;if(!a||a+0===a)return a;"object"==typeof a&&(a=a.getHours()+":"+u(a.getMinutes())+":"+u(a.getSeconds())),a=a.toLowerCase(),new Date(0);var b;if(-1===a.indexOf(":")?(b=a.match(/^([0-9]):?([0-5][0-9])?:?([0-5][0-9])?\s*([pa]?)m?$/),b||(b=a.match(/^([0-2][0-9]):?([0-5][0-9])?:?([0-5][0-9])?\s*([pa]?)m?$/))):b=a.match(/^(\d{1,2})(?::([0-5][0-9]))?(?::([0-5][0-9]))?\s*([pa]?)m?$/),!b)return null;var c,d=parseInt(1*b[1],10);c=b[4]?12===d?"p"===b[4]?12:0:d+("p"===b[4]?12:0):d;var e=1*b[2]||0,f=1*b[3]||0;return 3600*c+60*e+f}function t(a){return a.setHours(0,0,0,0)}function u(a){return("0"+a).slice(-2)}var v=b(),w=86400,x={className:null,minTime:null,maxTime:null,durationTime:null,step:30,showDuration:!1,timeFormat:"H:i",scrollDefaultNow:!1,scrollDefaultTime:!1,selectOnBlur:!1,disableTouchKeyboard:!0,forceRoundTime:!1,appendTo:"body",disableTimeRanges:[],timeRanges:[],closeOnWindowScroll:!1,disableTextInput:!1,legend:null},y={decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},z={init:function(b){return this.each(function(){var c=a(this);if("SELECT"===c[0].tagName){for(var e={type:"text",value:c.val()},f=c[0].attributes,g=0;g",e);c.replaceWith(h),c=h}var i=a.extend({},x);b&&(i=a.extend(i,b)),i.lang&&(y=a.extend(y,i.lang)),i=d(i),c.data("timepicker-settings",i),c.prop("autocomplete","off"),c.on("click.timepicker focus.timepicker",z.show),c.on("blur.timepicker",j),c.on("keydown.timepicker",m),c.on("keyup.timepicker",o),c.addClass("ui-timepicker-input"),j.call(c.get(0))})},show:function(){var b=a(this),c=b.data("timepicker-settings");"ontouchstart"in document&&c.disableTouchKeyboard&&b.blur();var d=b.data("timepicker-list");if(d&&0!==d.length&&"function"!=typeof c.durationTime||(e(b),d=b.data("timepicker-list")),!d.is(":visible")){z.hide(),d.show(),d.offset({left:b.offset().left+parseInt(d.css("marginLeft").replace("px",""),10),top:b.offset().top+b.outerHeight()+parseInt(d.css("marginTop").replace("px",""),10)});var g=d.find(".ui-timepicker-selected");if(g.length||(k(b)?g=h(b,d,s(k(b))):c.scrollDefaultNow?g=h(b,d,s(new Date)):c.scrollDefaultTime!==!1&&(g=h(b,d,s(c.scrollDefaultTime)))),g&&g.length){var i=d.scrollTop()+g.position().top-g.outerHeight();d.scrollTop(i)}else d.scrollTop(0);f(c),b.trigger("showTimepicker")}},hide:function(){a(".ui-timepicker-wrapper:visible").each(function(){var b=a(this),c=b.data("timepicker-input"),d=c.data("timepicker-settings");d&&d.selectOnBlur&&p(c),b.hide(),c.trigger("hideTimepicker")})},option:function(b,c){var e=this,f=e.data("timepicker-settings"),g=e.data("timepicker-list");if("object"==typeof b)f=a.extend(f,b);else if("string"==typeof b&&"undefined"!=typeof c)f[b]=c;else if("string"==typeof b)return f[b];return f=d(f),e.data("timepicker-settings",f),g&&(g.remove(),e.data("timepicker-list",!1)),e},get:function(){return a(this)},getSecondsFromMidnight:function(){return s(k(this))},getTime:function(){var a=this,b=t(new Date);return new Date(b.valueOf()+1e3*s(k(a)))},setTime:function(a){var b=this,c=r(s(a),b.data("timepicker-settings").timeFormat);l(b,c)},remove:function(){var a=this;a.hasClass("ui-timepicker-input")&&(a.removeAttr("autocomplete","off"),a.removeClass("ui-timepicker-input"),a.removeData("timepicker-settings"),a.off(".timepicker"),a.data("timepicker-list")&&a.data("timepicker-list").remove(),a.removeData("timepicker-list"))}};a.fn.timepicker=function(b){return z[b]?z[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?(a.error("Method "+b+" does not exist on nan-timepicker"),void 0):z.init.apply(this,arguments)}});
\ No newline at end of file
diff --git a/package.json b/package.json
index afac626..4140af3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "nan-timepicker",
- "version": "0.1.2",
+ "version": "0.1.3",
"description": "A lightweight time-picker plugin based on 'jQuery timepicker plugin'.",
"main": "index.js",
"scripts": {
diff --git a/src/nan-timepicker.js b/src/nan-timepicker.js
index 6dd81e6..d3ece9f 100644
--- a/src/nan-timepicker.js
+++ b/src/nan-timepicker.js
@@ -193,6 +193,10 @@
return self;
},
+ get: function() {
+ return $(this);
+ },
+
getSecondsFromMidnight: function() {
return _time2int(_getTimeValue(this));
},