diff --git a/CHANGELOG.md b/CHANGELOG.md index 310649c6..dfe8c0c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog +## 3.2.1 + +- [#210](https://github.com/amsul/pickadate.js/issues/210): Wrapped files using UMD patterns. +- [#207](https://github.com/amsul/pickadate.js/issues/207): Japanese translations added. +- Some other slight improvements. + ## 3.2.0 - [#178](https://github.com/amsul/pickadate.js/issues/178): Fix for flicker on iOS while changing months. diff --git a/README.md b/README.md index 78cafefd..ac826489 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# pickadate v3.2.0 [](https://travis-ci.org/amsul/pickadate.js) +# pickadate v3.2.1 [](https://travis-ci.org/amsul/pickadate.js) The mobile-friendly, responsive, and lightweight jQuery date & time input picker. @@ -11,7 +11,7 @@ The mobile-friendly, responsive, and lightweight jQuery date & time input picker #### To get it: -[Download v3.2.0](https://github.com/amsul/pickadate.js/archive/3.2.0.zip) or `git clone git://github.com/amsul/pickadate.js.git` or `bower install pickadate` +[Download v3.2.1](https://github.com/amsul/pickadate.js/archive/3.2.1.zip) or `git clone git://github.com/amsul/pickadate.js.git` or `bower install pickadate` @@ -36,9 +36,9 @@ There are currently two pickers: **date** and **time**. File | Contents | Size (min & gzip) ----------------------- | ------------------------ | ---------------------- -`picker.js` | __Base *__ | 1.28kb -`picker.date.js` | Date picker | 1.94kb -`picker.time.js` | Time picker | 1.30kb +`picker.js` | __Base *__ | 1.32kb +`picker.date.js` | Date picker | 1.96kb +`picker.time.js` | Time picker | 1.31kb __*__ The base script is **required** for any of the pickers to function. @@ -62,7 +62,7 @@ __*__ One and only one base stylesheet is **required**. [Choose a theme](http:// ### Translations -The translations are copied into the `lib/translations` folder. There are currently [31 languages](https://github.com/amsul/pickadate.js/blob/3.2.0/lib/translations) included. +The translations are copied into the `lib/translations` folder. There are currently [32 languages](https://github.com/amsul/pickadate.js/blob/3.2.1/lib/translations) included. diff --git a/_raw/CHANGELOG.md b/_raw/CHANGELOG.md index 5ace94c0..b4eb622d 100644 --- a/_raw/CHANGELOG.md +++ b/_raw/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog +## 3.2.1 + +- [#210]({%= meta.gitrepo_url %}/issues/210): Wrapped files using UMD patterns. +- [#207]({%= meta.gitrepo_url %}/issues/207): Japanese translations added. +- Some other slight improvements. + ## 3.2.0 - [#178]({%= meta.gitrepo_url %}/issues/178): Fix for flicker on iOS while changing months. diff --git a/_raw/api.htm b/_raw/api.htm index 3213bdff..cf5f4db0 100644 --- a/_raw/api.htm +++ b/_raw/api.htm @@ -164,8 +164,8 @@
Open the picker without focusing onto the input
element by passing false
as the first argument. Opening the picker this way, there’s a couple of things to note:
(1) The only way to close it is with a separate custom binding – in this example, on document click.
-(2) The “opening” events are still triggered – however, using the get
method to see if the picker is open will return false
.
(1) The only way to close it is with a separate custom binding – in this example, on document click.
+(2) The “opening” events are still triggered – however, using the get
method to see if the picker is open will return false
.
If any of the picker elements is focused/clicked, it resumes normal behavior.
picker.open(false)
@@ -905,7 +905,7 @@ Default Events
Scope and Arguments§
- Within scope of the events’ callbacks, this
refers to the picker object – and for most events, no arguments are passed.
+ Within scope of the events’ callbacks, this
refers to the picker object – and for most events, no arguments are passed.
The only exception is the set
method, which is passed an argument that provides more context as to what is being “set”.
@@ -993,7 +993,7 @@ Object $ro
Object _hidden
§
This is the picker’s relative hidden element, which is undefined
if there’s no formatSubmit
option.
- There should be no reason to use this – it’s mostly for internal use. If you have a valid reason for using this, please mention it in the Issues.
+ There should be no reason to use this – it’s mostly for internal use. If you have a valid reason for using this, please mention it in the Issues.
diff --git a/_raw/base.htm b/_raw/base.htm
index 96534dc3..cd9b3573 100644
--- a/_raw/base.htm
+++ b/_raw/base.htm
@@ -9,7 +9,7 @@
-{%= pkg.title %}{%= page != 'index' ? ' / ' + page : '' %}
+{%= pkg.title %}{%= page != 'index' ? ' / ' + page : '' %}
diff --git a/_raw/date.htm b/_raw/date.htm
index 91049c20..581977dd 100644
--- a/_raw/date.htm
+++ b/_raw/date.htm
@@ -233,7 +233,7 @@ FormatsWhen using translations, the input
element should be given a data-value
attribute formatted using the formatSubmit
– the element’s value
can be left blank. This helps to parse the date into the various languages:
+ When using translations, the input
element should be given a data-value
attribute formatted using the formatSubmit
– the element’s value
can be left blank. This helps to parse the date into the various languages:
<input data-value="2013/04/20">
{%= dateDemoField({ id: 'date_demo__formats--b' }).replace( 'type=text', 'name=date_demo__formats type=text data-value="2013/04/20"') %}
diff --git a/_raw/lib/legacy.js b/_raw/lib/legacy.js
index 42277ca1..564e2e97 100644
--- a/_raw/lib/legacy.js
+++ b/_raw/lib/legacy.js
@@ -12,13 +12,6 @@
* Legacy browser support
*/
-// isArray support
-if ( !Array.isArray ) {
- Array.isArray = function( value ) {
- return {}.toString.call( value ) == '[object Array]'
- }
-}
-
// Map array support
if ( ![].map ) {
diff --git a/_raw/lib/picker.date.js b/_raw/lib/picker.date.js
index f961302a..34ad7c29 100644
--- a/_raw/lib/picker.date.js
+++ b/_raw/lib/picker.date.js
@@ -188,7 +188,7 @@ DatePicker.prototype.create = function( type, value, options ) {
// If it’s an array, convert it into a date and make sure
// that it’s a valid date – otherwise default to today.
- else if ( Array.isArray( value ) ) {
+ else if ( $.isArray( value ) ) {
value = new Date( value[ 0 ], value[ 1 ], value[ 2 ] )
value = Picker._.isDate( value ) ? value : calendar.create().obj
}
@@ -320,7 +320,7 @@ DatePicker.prototype.validate = function( type, dateObject, options ) {
hasEnabledWeekdays = isInverted && calendar.item.disable.filter( function( value ) {
// If there’s a date, check where it is relative to the target.
- if ( Array.isArray( value ) ) {
+ if ( $.isArray( value ) ) {
var dateTime = calendar.create( value ).pick
if ( dateTime < dateObject.pick ) hasEnabledBeforeTarget = true
else if ( dateTime > dateObject.pick ) hasEnabledAfterTarget = true
@@ -412,7 +412,7 @@ DatePicker.prototype.disabled = function( dateObject ) {
}
// If it's an array, create the object and match the exact date.
- if ( Array.isArray( dateToDisable ) ) {
+ if ( $.isArray( dateToDisable ) ) {
return dateObject.pick === calendar.create( dateToDisable ).pick
}
}).length
@@ -434,7 +434,7 @@ DatePicker.prototype.parse = function( type, value, options ) {
var calendar = this,
parsingObject = {}
- if ( !value || Picker._.isInteger( value ) || Array.isArray( value ) || Picker._.isDate( value ) || Picker._.isObject( value ) && Picker._.isInteger( value.pick ) ) {
+ if ( !value || Picker._.isInteger( value ) || $.isArray( value ) || Picker._.isDate( value ) || Picker._.isObject( value ) && Picker._.isInteger( value.pick ) ) {
return value
}
@@ -632,10 +632,10 @@ DatePicker.prototype.removeDisabled = function( collection, item ) {
* Filter through the disabled collection to find a time unit.
*/
DatePicker.prototype.filterDisabled = function( collection, timeUnit, isRemoving ) {
- var timeIsArray = Array.isArray( timeUnit )
+ var timeIsArray = $.isArray( timeUnit )
return collection.filter( function( disabledTimeUnit ) {
var isMatch = !timeIsArray && timeUnit === disabledTimeUnit ||
- timeIsArray && Array.isArray( disabledTimeUnit ) && timeUnit.toString() === disabledTimeUnit.toString()
+ timeIsArray && $.isArray( disabledTimeUnit ) && timeUnit.toString() === disabledTimeUnit.toString()
return isRemoving ? !isMatch : isMatch
})
} //DatePicker.prototype.filterDisabled
diff --git a/_raw/lib/picker.js b/_raw/lib/picker.js
index b4d3d5bf..17addc35 100644
--- a/_raw/lib/picker.js
+++ b/_raw/lib/picker.js
@@ -130,7 +130,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
event.stopPropagation()
// If nothing inside is actively focused, re-focus the element.
- if ( !P.$root.find( document.activeElement ).length ) {
+ if ( !$.contains( P.$root[0], document.activeElement ) ) {
ELEMENT.focus()
}
@@ -154,9 +154,11 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
// If there’s a format for the hidden input element, create the element
- // using the name of the original input plus suffix. Otherwise set it to null.
+ // using the name of the original input plus suffix. Otherwise set it to undefined.
// If the element has a value, use either the `data-value` or `value`.
- P._hidden = SETTINGS.formatSubmit ? $( '' )[ 0 ] : undefined
+ if ( SETTINGS.formatSubmit ) {
+ P._hidden = $( '' )[ 0 ]
+ }
// Add the class and bind the events on the element.
@@ -366,7 +368,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
// If the target is within the root and “enter” is pressed,
// prevent the default action and trigger a click on the target instead.
- else if ( P.$root.find( target ).length && keycode == 13 ) {
+ else if ( $.contains( P.$root[0], target ) && keycode == 13 ) {
event.preventDefault()
target.click()
}
@@ -687,7 +689,7 @@ PickerConstructor._ = {
if ( !item ) return ''
// If the item is an array, do a join
- item = Array.isArray( item ) ? item.join( '' ) : item
+ item = $.isArray( item ) ? item.join( '' ) : item
// Check for the class
klass = klass ? ' class="' + klass + '"' : ''
diff --git a/_raw/lib/picker.time.js b/_raw/lib/picker.time.js
index d755c157..fc7962f7 100644
--- a/_raw/lib/picker.time.js
+++ b/_raw/lib/picker.time.js
@@ -182,7 +182,7 @@ TimePicker.prototype.create = function( type, value, options ) {
}
// If it's an array, convert it into minutes.
- else if ( Array.isArray( value ) ) {
+ else if ( $.isArray( value ) ) {
value = +value[ 0 ] * MINUTES_IN_HOUR + (+value[ 1 ])
}
@@ -323,7 +323,7 @@ TimePicker.prototype.disabled = function( timeObject ) {
}
// If it's an array, create the object and match the times.
- if ( Array.isArray( timeToDisable ) ) {
+ if ( $.isArray( timeToDisable ) ) {
return timeObject.pick == clock.create( timeToDisable ).pick
}
}).length
@@ -377,7 +377,7 @@ TimePicker.prototype.parse = function( type, value, options ) {
clock = this,
parsingObject = {}
- if ( !value || Picker._.isInteger( value ) || Array.isArray( value ) || Picker._.isDate( value ) || Picker._.isObject( value ) && Picker._.isInteger( value.pick ) ) {
+ if ( !value || Picker._.isInteger( value ) || $.isArray( value ) || Picker._.isDate( value ) || Picker._.isObject( value ) && Picker._.isInteger( value.pick ) ) {
return value
}
@@ -533,10 +533,10 @@ TimePicker.prototype.removeDisabled = function( collection, item ) {
* Filter through the disabled collection to find a time unit.
*/
TimePicker.prototype.filterDisabled = function( collection, timeUnit, isRemoving ) {
- var timeIsArray = Array.isArray( timeUnit )
+ var timeIsArray = $.isArray( timeUnit )
return collection.filter( function( disabledTimeUnit ) {
var isMatch = !timeIsArray && timeUnit === disabledTimeUnit ||
- timeIsArray && Array.isArray( disabledTimeUnit ) && timeUnit.toString() === disabledTimeUnit.toString()
+ timeIsArray && $.isArray( disabledTimeUnit ) && timeUnit.toString() === disabledTimeUnit.toString()
return isRemoving ? !isMatch : isMatch
})
} //TimePicker.prototype.filterDisabled
diff --git a/_raw/lib/themes/classic.less b/_raw/lib/themes/classic.less
index f369ab59..cef534b9 100644
--- a/_raw/lib/themes/classic.less
+++ b/_raw/lib/themes/classic.less
@@ -46,7 +46,7 @@
// Tilt the picker.
.transform( translateY( -1em ) perspective( 600px ) rotateX( 10deg ) );
- // Everything should be smoothly animated – the height should wait till the rest is done.
+ // Everything should be smoothly animated – the height should wait till the rest is done.
@transition: all @speed-animate-in ease-out, max-height 0 @speed-animate-in;
.transition( @transition );
}
@@ -66,7 +66,7 @@
// Straighten the picker.
.transform( translateY( 0 ) perspective( 600px ) rotateX( 0 ) );
- // Everything should be smoothly animated – except the height.
+ // Everything should be smoothly animated – except the height.
@transition: all @speed-animate-in ease-out, max-height 0;
.transition( @transition );
diff --git a/api.htm b/api.htm
index d6b3957a..6beede39 100644
--- a/api.htm
+++ b/api.htm
@@ -9,7 +9,7 @@
-pickadate.js / api
+pickadate.js / api
@@ -207,8 +207,8 @@ Close with focus
Open without focus§
Open the picker without focusing onto the input
element by passing false
as the first argument. Opening the picker this way, there’s a couple of things to note:
- (1) The only way to close it is with a separate custom binding – in this example, on document click.
- (2) The “opening” events are still triggered – however, using the get
method to see if the picker is open will return false
.
+ (1) The only way to close it is with a separate custom binding – in this example, on document click.
+ (2) The “opening” events are still triggered – however, using the get
method to see if the picker is open will return false
.
If any of the picker elements is focused/clicked, it resumes normal behavior.
picker.open(false)
@@ -269,7 +269,7 @@ Clearpicker.clear()
-
+
This is a shorthand that uses the set
method behind the scenes.
@@ -332,16 +332,16 @@ * Item Ob
pick: 1366430400000
}
- Here’s a time picker item object for 3:30 AM:
+Here’s a time picker item object for 6:49 PM:
{
// Hour of the day from 0 to 23.
- hour: 3,
+ hour: 18,
// The minutes of the hour from 0 to 59 (based on the interval).
mins: 0,
// The “pick” value used for comparisons.
- pick: 240
+ pick: 1140
}
@@ -359,7 +359,7 @@ picker.get() // Short for `picker.get('value')`.
-
+
@@ -526,7 +526,7 @@ Set picker.set('clear')
-
+
This is the full form of the clear
method.
@@ -809,7 +809,7 @@ Default Events
Scope and Arguments§
- Within scope of the events’ callbacks, this
refers to the picker object – and for most events, no arguments are passed.
+ Within scope of the events’ callbacks, this
refers to the picker object – and for most events, no arguments are passed.
The only exception is the set
method, which is passed an argument that provides more context as to what is being “set”.
@@ -885,7 +885,7 @@ Object $ro
Object _hidden
§
This is the picker’s relative hidden element, which is undefined
if there’s no formatSubmit
option.
- There should be no reason to use this – it’s mostly for internal use. If you have a valid reason for using this, please mention it in the Issues.
+ There should be no reason to use this – it’s mostly for internal use. If you have a valid reason for using this, please mention it in the Issues.
diff --git a/date.htm b/date.htm
index e5cc5371..594e3873 100644
--- a/date.htm
+++ b/date.htm
@@ -9,7 +9,7 @@
-pickadate.js / date
+pickadate.js / date
@@ -71,8 +71,8 @@ The basic setup requires targetting an
- Along with v3, the v2 options and API have effectively been deprecated. Read up on the full changelog here.
- One of the most critical changes is that the “month” used to create dates, just as in JavaScript’s native Date object, now has zero-as-index.
+ Along with v3, the v2 options and API have effectively been deprecated. Read up on the full changelog here.
+ One of the most critical changes is that the “month” used to create dates, just as in JavaScript’s native Date object, now has zero-as-index.
@@ -237,7 +237,7 @@ Buttons
Translations§
- The picker can be extended to add support for internationalization. There are translations available for 31 languages which you can include in one of two ways:
+ The picker can be extended to add support for internationalization. There are translations available for 32 languages which you can include in one of two ways:
// Extend the default picker options for all instances.
$.extend($.fn.pickadate.defaults, {
@@ -282,7 +282,7 @@ Formats
- When using translations, the input
element should be given a data-value
attribute formatted using the formatSubmit
– the element’s value
can be left blank. This helps to parse the date into the various languages:
+ When using translations, the input
element should be given a data-value
attribute formatted using the formatSubmit
– the element’s value
can be left blank. This helps to parse the date into the various languages:
<input data-value="2013/04/20">
diff --git a/index.htm b/index.htm
index d2135b69..87eb782d 100644
--- a/index.htm
+++ b/index.htm
@@ -52,7 +52,7 @@

The mobile-friendly, responsive, and lightweight
jQuery date & time input picker.
- Download pickadate.js v3.2.0
+ Download pickadate.js v3.2.1
diff --git a/lib/compressed/legacy.js b/lib/compressed/legacy.js
index 9c9db231..a5c8fa52 100644
--- a/lib/compressed/legacy.js
+++ b/lib/compressed/legacy.js
@@ -1,7 +1,7 @@
/*!
* Legacy browser support
*/
-Array.isArray||(Array.isArray=function(a){return"[object Array]"=={}.toString.call(a)}),[].map||(Array.prototype.map=function(a,b){for(var c=this,d=c.length,e=new Array(d),f=0;d>f;f++)f in c&&(e[f]=a.call(b,c[f],f,c));return e}),[].filter||(Array.prototype.filter=function(a){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=[],e=arguments[1],f=0;c>f;f++)if(f in b){var g=b[f];a.call(e,g,f,b)&&d.push(g)}return d}),[].indexOf||(Array.prototype.indexOf=function(a){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!=d?d=0:0!==d&&1/0!=d&&d!=-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1});/*!
+[].map||(Array.prototype.map=function(a,b){for(var c=this,d=c.length,e=new Array(d),f=0;d>f;f++)f in c&&(e[f]=a.call(b,c[f],f,c));return e}),[].filter||(Array.prototype.filter=function(a){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=[],e=arguments[1],f=0;c>f;f++)if(f in b){var g=b[f];a.call(e,g,f,b)&&d.push(g)}return d}),[].indexOf||(Array.prototype.indexOf=function(a){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!=d?d=0:0!==d&&1/0!=d&&d!=-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1});/*!
* Cross-Browser Split 1.1.1
* Copyright 2007-2012 Steven Levithan
* Available under the MIT License
diff --git a/lib/compressed/picker.date.js b/lib/compressed/picker.date.js
index c6e63afd..2b165d06 100644
--- a/lib/compressed/picker.date.js
+++ b/lib/compressed/picker.date.js
@@ -1,5 +1,5 @@
/*!
- * Date picker for pickadate.js v3.2.0
+ * Date picker for pickadate.js v3.2.1
* http://amsul.github.io/pickadate.js/date.htm
*/
-!function(a){"function"==typeof define&&define.amd?define(["picker"],a):a(Picker)}(function(a){function b(a,b){var c=this,d=a.$node[0].value,e=a.$node.data("value"),f=e||d,g=e?b.formatSubmit:b.format;c.settings=b,c.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"navigate create validate",view:"create validate viewset",disable:"flipItem",enable:"flipItem"},c.item={},c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return a[0]===!0?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now").set("select",f||c.item.now,{format:g,data:function(a){return f&&(a.indexOf("mm")>-1||a.indexOf("m")>-1)}(c.formats.toArray(g))}),c.key={40:7,38:-7,39:1,37:-1,go:function(a){c.set("highlight",[c.item.highlight.year,c.item.highlight.month,c.item.highlight.date+a],{interval:a}),this.render()}},a.on("render",function(){a.$root.find("."+b.klass.selectMonth).on("change",function(){a.set("highlight",[a.get("view").year,this.value,a.get("highlight").date]),a.$root.find("."+b.klass.selectMonth).focus()}),a.$root.find("."+b.klass.selectYear).on("change",function(){a.set("highlight",[this.value,a.get("view").month,a.get("highlight").date]),a.$root.find("."+b.klass.selectYear).focus()})}).on("open",function(){a.$root.find("button, select").attr("disabled",!1)}).on("close",function(){a.$root.find("button, select").attr("disabled",!0)})}var c=7,d=6;b.prototype.set=function(a,b,c){var d=this;return d.item["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",d.item.select,c):"highlight"==a?d.set("view",d.item.highlight,c):("flip"==a||"min"==a||"max"==a||"disable"==a||"enable"==a)&&d.item.select&&d.item.highlight&&d.set("select",d.item.select,c).set("highlight",d.item.highlight,c),d},b.prototype.get=function(a){return this.item[a]},b.prototype.create=function(b,c,d){var e,f=this;return c=void 0===c?b:c,c==-1/0||1/0==c?e=c:a._.isObject(c)&&a._.isInteger(c.pick)?c=c.obj:Array.isArray(c)?(c=new Date(c[0],c[1],c[2]),c=a._.isDate(c)?c:f.create().obj):c=a._.isInteger(c)||a._.isDate(c)?f.normalize(new Date(c),d):f.now(b,c,d),{year:e||c.getFullYear(),month:e||c.getMonth(),date:e||c.getDate(),day:e||c.getDay(),obj:e||c,pick:e||c.getTime()}},b.prototype.now=function(a,b,c){return b=new Date,c&&c.rel&&b.setDate(b.getDate()+c.rel),this.normalize(b,c)},b.prototype.navigate=function(b,c,d){if(a._.isObject(c)){for(var e=new Date(c.year,c.month+(d&&d.nav?d.nav:0),1),f=e.getFullYear(),g=e.getMonth(),h=c.date;a._.isDate(e)&&new Date(f,g,h).getMonth()!==g;)h-=1;c=[f,g,h]}return c},b.prototype.normalize=function(a){return a.setHours(0,0,0,0),a},b.prototype.measure=function(b,c){var d=this;return c?a._.isInteger(c)&&(c=d.now(b,c,{rel:c})):c="min"==b?-1/0:1/0,c},b.prototype.viewset=function(a,b){return this.create([b.year,b.month,1])},b.prototype.validate=function(b,c,d){var e,f,g,h,i=this,j=c,k=d&&d.interval?d.interval:1,l=-1===i.item.enable,m=i.item.min,n=i.item.max,o=l&&i.item.disable.filter(function(b){if(Array.isArray(b)){var d=i.create(b).pick;dc.pick&&(f=!0)}return a._.isInteger(b)}).length;if(!d.nav&&(!l&&i.disabled(c)||l&&i.disabled(c)&&(o||e||f)||c.pick<=m.pick||c.pick>=n.pick))for(l&&!o&&(!f&&k>0||!e&&0>k)&&(k*=-1);i.disabled(c)&&(Math.abs(k)>1&&(c.monthj.month)&&(c=j,k=Math.abs(k)/k),c.pick<=m.pick?(g=!0,k=1):c.pick>=n.pick&&(h=!0,k=-1),!g||!h);)c=i.create([c.year,c.month,c.date+k]);return c},b.prototype.disabled=function(b){var c=this,d=c.item.disable.filter(function(d){return a._.isInteger(d)?b.day===(c.settings.firstDay?d:d-1)%7:Array.isArray(d)?b.pick===c.create(d).pick:void 0}).length;return b.pickc.item.max.pick||-1===c.item.enable?!d:d},b.prototype.parse=function(b,c,d){var e=this,f={};if(!c||a._.isInteger(c)||Array.isArray(c)||a._.isDate(c)||a._.isObject(c)&&a._.isInteger(c.pick))return c;if(!d||!d.format)throw"Need a formatting option to parse this..";return e.formats.toArray(d.format).map(function(b){var d=e.formats[b],g=d?a._.trigger(d,e,[c,f]):b.replace(/^!/,"").length;d&&(f[b]=c.substr(0,g)),c=c.substr(g)}),[f.yyyy||f.yy,+(f.mm||f.m)-(d.data?1:0),f.dd||f.d]},b.prototype.formats=function(){function b(a,b,c){var d=a.match(/\w+/)[0];return c.mm||c.m||(c.m=b.indexOf(d)),d.length}function c(a){return a.match(/\w+/)[0].length}return{d:function(b,c){return b?a._.digits(b):c.date},dd:function(b,c){return b?2:a._.lead(c.date)},ddd:function(a,b){return a?c(a):this.settings.weekdaysShort[b.day]},dddd:function(a,b){return a?c(a):this.settings.weekdaysFull[b.day]},m:function(b,c){return b?a._.digits(b):c.month+1},mm:function(b,c){return b?2:a._.lead(c.month+1)},mmm:function(a,c){var d=this.settings.monthsShort;return a?b(a,d,c):d[c.month]},mmmm:function(a,c){var d=this.settings.monthsFull;return a?b(a,d,c):d[c.month]},yy:function(a,b){return a?2:(""+b.year).slice(2)},yyyy:function(a,b){return a?4:b.year},toArray:function(a){return a.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(b,c){var d=this;return d.formats.toArray(b).map(function(b){return a._.trigger(d.formats[b],d,[0,c])||b.replace(/^!/,"")}).join("")}}}(),b.prototype.flipItem=function(a,b){var c=this,d=c.item.disable,e=-1===c.item.enable;return"flip"==b?c.item.enable=e?1:-1:!e&&"enable"==a||e&&"disable"==a?d=c.removeDisabled(d,b):(!e&&"disable"==a||e&&"enable"==a)&&(d=c.addDisabled(d,b)),d},b.prototype.addDisabled=function(a,b){var c=this;return b.map(function(b){c.filterDisabled(a,b).length||a.push(b)}),a},b.prototype.removeDisabled=function(a,b){var c=this;return b.map(function(b){a=c.filterDisabled(a,b,1)}),a},b.prototype.filterDisabled=function(a,b,c){var d=Array.isArray(b);return a.filter(function(a){var e=!d&&b===a||d&&Array.isArray(a)&&b.toString()===a.toString();return c?!e:e})},b.prototype.nodes=function(b){var e=this,f=e.settings,g=e.item.now,h=e.item.select,i=e.item.highlight,j=e.item.view,k=e.item.disable,l=e.item.min,m=e.item.max,n=function(b){return f.firstDay&&b.push(b.shift()),a._.node("thead",a._.group({min:0,max:c-1,i:1,node:"th",item:function(a){return[b[a],f.klass.weekdays]}}))}((f.showWeekdaysFull?f.weekdaysFull:f.weekdaysShort).slice(0)),o=function(b){return a._.node("div"," ",f.klass["nav"+(b?"Next":"Prev")]+(b&&j.year>=m.year&&j.month>=m.month||!b&&j.year<=l.year&&j.month<=l.month?" "+f.klass.navDisabled:""),"data-nav="+(b||-1))},p=function(c){return f.selectMonths?a._.node("select",a._.group({min:0,max:11,i:1,node:"option",item:function(a){return[c[a],0,"value="+a+(j.month==a?" selected":"")+(j.year==l.year&&am.month?" disabled":"")]}}),f.klass.selectMonth,b?"":"disabled"):a._.node("div",c[j.month],f.klass.month)},q=function(){var c=j.year,d=f.selectYears===!0?5:~~(f.selectYears/2);if(d){var e=l.year,g=m.year,h=c-d,i=c+d;if(e>h&&(i+=e-h,h=e),i>g){var k=h-e,n=i-g;h-=k>n?n:k,i=g}return a._.node("select",a._.group({min:h,max:i,i:1,node:"option",item:function(a){return[a,0,"value="+a+(c==a?" selected":"")]}}),f.klass.selectYear,b?"":"disabled")}return a._.node("div",c,f.klass.year)};return a._.node("div",o()+o(1)+p(f.showMonthsShort?f.monthsShort:f.monthsFull)+q(),f.klass.header)+a._.node("table",n+a._.node("tbody",a._.group({min:0,max:d-1,i:1,node:"tr",item:function(b){var d=f.firstDay&&0===e.create([j.year,j.month,1]).day?-7:0;return[a._.group({min:c*b-j.day+d+1,max:function(){return this.min+c-1},i:1,node:"td",item:function(b){return b=e.create([j.year,j.month,b+(f.firstDay?1:0)]),[a._.node("div",b.date,function(a){return a.push(j.month==b.month?f.klass.infocus:f.klass.outfocus),g.pick==b.pick&&a.push(f.klass.now),h&&h.pick==b.pick&&a.push(f.klass.selected),i&&i.pick==b.pick&&a.push(f.klass.highlighted),(k&&e.disabled(b)||b.pickm.pick)&&a.push(f.klass.disabled),a.join(" ")}([f.klass.day]),"data-pick="+b.pick)]}})]}})),f.klass.table)+a._.node("div",a._.node("button",f.today,f.klass.buttonToday,"data-pick="+g.pick+(b?"":" disabled"))+a._.node("button",f.clear,f.klass.buttonClear,"data-clear=1"+(b?"":" disabled")),f.klass.footer)},b.defaults=function(a){return{monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",format:"d mmmm, yyyy",klass:{table:a+"table",header:a+"header",navPrev:a+"nav--prev",navNext:a+"nav--next",navDisabled:a+"nav--disabled",month:a+"month",year:a+"year",selectMonth:a+"select--month",selectYear:a+"select--year",weekdays:a+"weekday",day:a+"day",disabled:a+"day--disabled",selected:a+"day--selected",highlighted:a+"day--highlighted",now:a+"day--today",infocus:a+"day--infocus",outfocus:a+"day--outfocus",footer:a+"footer",buttonClear:a+"button--clear",buttonToday:a+"button--today"}}}(a.klasses().picker+"__"),a.extend("pickadate",b)});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["picker"],a):a(Picker)}(function(a){function b(a,b){var c=this,d=a.$node[0].value,e=a.$node.data("value"),f=e||d,g=e?b.formatSubmit:b.format;c.settings=b,c.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"navigate create validate",view:"create validate viewset",disable:"flipItem",enable:"flipItem"},c.item={},c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return a[0]===!0?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now").set("select",f||c.item.now,{format:g,data:function(a){return f&&(a.indexOf("mm")>-1||a.indexOf("m")>-1)}(c.formats.toArray(g))}),c.key={40:7,38:-7,39:1,37:-1,go:function(a){c.set("highlight",[c.item.highlight.year,c.item.highlight.month,c.item.highlight.date+a],{interval:a}),this.render()}},a.on("render",function(){a.$root.find("."+b.klass.selectMonth).on("change",function(){a.set("highlight",[a.get("view").year,this.value,a.get("highlight").date]),a.$root.find("."+b.klass.selectMonth).focus()}),a.$root.find("."+b.klass.selectYear).on("change",function(){a.set("highlight",[this.value,a.get("view").month,a.get("highlight").date]),a.$root.find("."+b.klass.selectYear).focus()})}).on("open",function(){a.$root.find("button, select").attr("disabled",!1)}).on("close",function(){a.$root.find("button, select").attr("disabled",!0)})}var c=7,d=6;b.prototype.set=function(a,b,c){var d=this;return d.item["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",d.item.select,c):"highlight"==a?d.set("view",d.item.highlight,c):("flip"==a||"min"==a||"max"==a||"disable"==a||"enable"==a)&&d.item.select&&d.item.highlight&&d.set("select",d.item.select,c).set("highlight",d.item.highlight,c),d},b.prototype.get=function(a){return this.item[a]},b.prototype.create=function(b,c,d){var e,f=this;return c=void 0===c?b:c,c==-1/0||1/0==c?e=c:a._.isObject(c)&&a._.isInteger(c.pick)?c=c.obj:$.isArray(c)?(c=new Date(c[0],c[1],c[2]),c=a._.isDate(c)?c:f.create().obj):c=a._.isInteger(c)||a._.isDate(c)?f.normalize(new Date(c),d):f.now(b,c,d),{year:e||c.getFullYear(),month:e||c.getMonth(),date:e||c.getDate(),day:e||c.getDay(),obj:e||c,pick:e||c.getTime()}},b.prototype.now=function(a,b,c){return b=new Date,c&&c.rel&&b.setDate(b.getDate()+c.rel),this.normalize(b,c)},b.prototype.navigate=function(b,c,d){if(a._.isObject(c)){for(var e=new Date(c.year,c.month+(d&&d.nav?d.nav:0),1),f=e.getFullYear(),g=e.getMonth(),h=c.date;a._.isDate(e)&&new Date(f,g,h).getMonth()!==g;)h-=1;c=[f,g,h]}return c},b.prototype.normalize=function(a){return a.setHours(0,0,0,0),a},b.prototype.measure=function(b,c){var d=this;return c?a._.isInteger(c)&&(c=d.now(b,c,{rel:c})):c="min"==b?-1/0:1/0,c},b.prototype.viewset=function(a,b){return this.create([b.year,b.month,1])},b.prototype.validate=function(b,c,d){var e,f,g,h,i=this,j=c,k=d&&d.interval?d.interval:1,l=-1===i.item.enable,m=i.item.min,n=i.item.max,o=l&&i.item.disable.filter(function(b){if($.isArray(b)){var d=i.create(b).pick;dc.pick&&(f=!0)}return a._.isInteger(b)}).length;if(!d.nav&&(!l&&i.disabled(c)||l&&i.disabled(c)&&(o||e||f)||c.pick<=m.pick||c.pick>=n.pick))for(l&&!o&&(!f&&k>0||!e&&0>k)&&(k*=-1);i.disabled(c)&&(Math.abs(k)>1&&(c.monthj.month)&&(c=j,k=Math.abs(k)/k),c.pick<=m.pick?(g=!0,k=1):c.pick>=n.pick&&(h=!0,k=-1),!g||!h);)c=i.create([c.year,c.month,c.date+k]);return c},b.prototype.disabled=function(b){var c=this,d=c.item.disable.filter(function(d){return a._.isInteger(d)?b.day===(c.settings.firstDay?d:d-1)%7:$.isArray(d)?b.pick===c.create(d).pick:void 0}).length;return b.pickc.item.max.pick||-1===c.item.enable?!d:d},b.prototype.parse=function(b,c,d){var e=this,f={};if(!c||a._.isInteger(c)||$.isArray(c)||a._.isDate(c)||a._.isObject(c)&&a._.isInteger(c.pick))return c;if(!d||!d.format)throw"Need a formatting option to parse this..";return e.formats.toArray(d.format).map(function(b){var d=e.formats[b],g=d?a._.trigger(d,e,[c,f]):b.replace(/^!/,"").length;d&&(f[b]=c.substr(0,g)),c=c.substr(g)}),[f.yyyy||f.yy,+(f.mm||f.m)-(d.data?1:0),f.dd||f.d]},b.prototype.formats=function(){function b(a,b,c){var d=a.match(/\w+/)[0];return c.mm||c.m||(c.m=b.indexOf(d)),d.length}function c(a){return a.match(/\w+/)[0].length}return{d:function(b,c){return b?a._.digits(b):c.date},dd:function(b,c){return b?2:a._.lead(c.date)},ddd:function(a,b){return a?c(a):this.settings.weekdaysShort[b.day]},dddd:function(a,b){return a?c(a):this.settings.weekdaysFull[b.day]},m:function(b,c){return b?a._.digits(b):c.month+1},mm:function(b,c){return b?2:a._.lead(c.month+1)},mmm:function(a,c){var d=this.settings.monthsShort;return a?b(a,d,c):d[c.month]},mmmm:function(a,c){var d=this.settings.monthsFull;return a?b(a,d,c):d[c.month]},yy:function(a,b){return a?2:(""+b.year).slice(2)},yyyy:function(a,b){return a?4:b.year},toArray:function(a){return a.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(b,c){var d=this;return d.formats.toArray(b).map(function(b){return a._.trigger(d.formats[b],d,[0,c])||b.replace(/^!/,"")}).join("")}}}(),b.prototype.flipItem=function(a,b){var c=this,d=c.item.disable,e=-1===c.item.enable;return"flip"==b?c.item.enable=e?1:-1:!e&&"enable"==a||e&&"disable"==a?d=c.removeDisabled(d,b):(!e&&"disable"==a||e&&"enable"==a)&&(d=c.addDisabled(d,b)),d},b.prototype.addDisabled=function(a,b){var c=this;return b.map(function(b){c.filterDisabled(a,b).length||a.push(b)}),a},b.prototype.removeDisabled=function(a,b){var c=this;return b.map(function(b){a=c.filterDisabled(a,b,1)}),a},b.prototype.filterDisabled=function(a,b,c){var d=$.isArray(b);return a.filter(function(a){var e=!d&&b===a||d&&$.isArray(a)&&b.toString()===a.toString();return c?!e:e})},b.prototype.nodes=function(b){var e=this,f=e.settings,g=e.item.now,h=e.item.select,i=e.item.highlight,j=e.item.view,k=e.item.disable,l=e.item.min,m=e.item.max,n=function(b){return f.firstDay&&b.push(b.shift()),a._.node("thead",a._.group({min:0,max:c-1,i:1,node:"th",item:function(a){return[b[a],f.klass.weekdays]}}))}((f.showWeekdaysFull?f.weekdaysFull:f.weekdaysShort).slice(0)),o=function(b){return a._.node("div"," ",f.klass["nav"+(b?"Next":"Prev")]+(b&&j.year>=m.year&&j.month>=m.month||!b&&j.year<=l.year&&j.month<=l.month?" "+f.klass.navDisabled:""),"data-nav="+(b||-1))},p=function(c){return f.selectMonths?a._.node("select",a._.group({min:0,max:11,i:1,node:"option",item:function(a){return[c[a],0,"value="+a+(j.month==a?" selected":"")+(j.year==l.year&&am.month?" disabled":"")]}}),f.klass.selectMonth,b?"":"disabled"):a._.node("div",c[j.month],f.klass.month)},q=function(){var c=j.year,d=f.selectYears===!0?5:~~(f.selectYears/2);if(d){var e=l.year,g=m.year,h=c-d,i=c+d;if(e>h&&(i+=e-h,h=e),i>g){var k=h-e,n=i-g;h-=k>n?n:k,i=g}return a._.node("select",a._.group({min:h,max:i,i:1,node:"option",item:function(a){return[a,0,"value="+a+(c==a?" selected":"")]}}),f.klass.selectYear,b?"":"disabled")}return a._.node("div",c,f.klass.year)};return a._.node("div",o()+o(1)+p(f.showMonthsShort?f.monthsShort:f.monthsFull)+q(),f.klass.header)+a._.node("table",n+a._.node("tbody",a._.group({min:0,max:d-1,i:1,node:"tr",item:function(b){var d=f.firstDay&&0===e.create([j.year,j.month,1]).day?-7:0;return[a._.group({min:c*b-j.day+d+1,max:function(){return this.min+c-1},i:1,node:"td",item:function(b){return b=e.create([j.year,j.month,b+(f.firstDay?1:0)]),[a._.node("div",b.date,function(a){return a.push(j.month==b.month?f.klass.infocus:f.klass.outfocus),g.pick==b.pick&&a.push(f.klass.now),h&&h.pick==b.pick&&a.push(f.klass.selected),i&&i.pick==b.pick&&a.push(f.klass.highlighted),(k&&e.disabled(b)||b.pickm.pick)&&a.push(f.klass.disabled),a.join(" ")}([f.klass.day]),"data-pick="+b.pick)]}})]}})),f.klass.table)+a._.node("div",a._.node("button",f.today,f.klass.buttonToday,"data-pick="+g.pick+(b?"":" disabled"))+a._.node("button",f.clear,f.klass.buttonClear,"data-clear=1"+(b?"":" disabled")),f.klass.footer)},b.defaults=function(a){return{monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",format:"d mmmm, yyyy",klass:{table:a+"table",header:a+"header",navPrev:a+"nav--prev",navNext:a+"nav--next",navDisabled:a+"nav--disabled",month:a+"month",year:a+"year",selectMonth:a+"select--month",selectYear:a+"select--year",weekdays:a+"weekday",day:a+"day",disabled:a+"day--disabled",selected:a+"day--selected",highlighted:a+"day--highlighted",now:a+"day--today",infocus:a+"day--infocus",outfocus:a+"day--outfocus",footer:a+"footer",buttonClear:a+"button--clear",buttonToday:a+"button--today"}}}(a.klasses().picker+"__"),a.extend("pickadate",b)});
\ No newline at end of file
diff --git a/lib/compressed/picker.js b/lib/compressed/picker.js
index d19f73af..95773565 100644
--- a/lib/compressed/picker.js
+++ b/lib/compressed/picker.js
@@ -1,7 +1,7 @@
/*!
- * pickadate.js v3.2.0, 2013/08/24
+ * pickadate.js v3.2.1, 2013/08/24
* By Amsul, http://amsul.ca
* Hosted on http://amsul.github.io/pickadate.js
* Licensed under MIT
*/
-!function(a){"function"==typeof define&&define.amd?define("picker",["jquery"],a):this.Picker=a(jQuery)}(function(a){function b(d,e,f,g){function h(){return b._.node("div",b._.node("div",b._.node("div",b._.node("div",o.component.nodes(j.open),l.box),l.wrap),l.frame),l.holder)}function i(a){a.stopPropagation(),"focus"==a.type&&o.$root.addClass(l.focused),o.open()}if(!d)return b;var j={id:Math.abs(~~(1e9*Math.random()))},k=f?a.extend(!0,{},f.defaults,g):g||{},l=a.extend({},b.klasses(),k.klass),m=a(d),n=function(){return this.start()},o=n.prototype={constructor:n,$node:m,start:function(){return j&&j.start?o:(j.methods={},j.start=!0,j.open=!1,j.type=d.type,d.autofocus=d==document.activeElement,d.type="text",d.readOnly=!0,o.component=new f(o,k),o.$root=a(b._.node("div",h(),l.picker)).on({focusin:function(a){o.$root.removeClass(l.focused),a.stopPropagation()},mousedown:function(a){a.target!=o.$root.children()[0]&&a.stopPropagation()},click:function(c){var e=c.target,f=e.attributes.length?a(e):a(e).closest("[data-pick]"),g=f.data();e!=o.$root.children()[0]&&(c.stopPropagation(),o.$root.find(document.activeElement).length||d.focus(),g.nav&&!f.hasClass(l.navDisabled)?o.set("highlight",o.component.item.highlight,{nav:g.nav}):b._.isInteger(g.pick)&&!f.hasClass(l.disabled)?o.set("select",g.pick).close(!0):g.clear&&o.clear().close(!0))}}),o._hidden=k.formatSubmit?a("")[0]:void 0,m.addClass(l.input).on("focus.P"+j.id+" click.P"+j.id,i).on("change.P"+j.id,function(){o._hidden&&(o._hidden.value=d.value?b._.trigger(o.component.formats.toString,o.component,[k.formatSubmit,o.component.item.select]):"")}).on("keydown.P"+j.id,function(a){var b=a.keyCode,c=/^(8|46)$/.test(b);return 27==b?(o.close(),!1):((32==b||c||!j.open&&o.component.key[b])&&(a.preventDefault(),a.stopPropagation(),c?o.clear().close():o.open()),void 0)}).val(m.data("value")?b._.trigger(o.component.formats.toString,o.component,[k.format,o.component.item.select]):d.value).after(o._hidden).data(e,o),k.container?a(k.container).append(o.$root):m.after(o.$root),o.on({start:o.component.onStart,render:o.component.onRender,stop:o.component.onStop,open:o.component.onOpen,close:o.component.onClose,set:o.component.onSet}).on({start:k.onStart,render:k.onRender,stop:k.onStop,open:k.onOpen,close:k.onClose,set:k.onSet}),d.autofocus&&o.open(),o.trigger("start").trigger("render"))},render:function(a){return a?o.$root.html(h()):o.$root.find("."+l.box).html(o.component.nodes(j.open)),o.trigger("render")},stop:function(){return j.start?(o.close(),o._hidden&&o._hidden.parentNode.removeChild(o._hidden),o.$root.remove(),m.removeClass(l.input).off(".P"+j.id).removeData(e),d.type=j.type,d.readOnly=!1,o.trigger("stop"),j.methods={},j.start=!1,o):o},open:function(a){return j.open?o:(m.addClass(l.active),o.$root.addClass(l.opened),a!==!1&&(j.open=!0,m.focus(),c.on("click.P"+j.id+" focusin.P"+j.id,function(a){a.target!=d&&a.target!=document&&o.close()}).on("keydown.P"+j.id,function(a){var c=a.keyCode,e=o.component.key[c],f=a.target;27==c?o.close(!0):f!=d||!e&&13!=c?o.$root.find(f).length&&13==c&&(a.preventDefault(),f.click()):(a.preventDefault(),e?b._.trigger(o.component.key.go,o,[e]):o.$root.find("."+l.highlighted).hasClass(l.disabled)||o.set("select",o.component.item.highlight).close())})),o.trigger("open"))},close:function(a){return a&&(m.off("focus.P"+j.id).focus(),setTimeout(function(){m.on("focus.P"+j.id,i)},0)),m.removeClass(l.active),o.$root.removeClass(l.opened+" "+l.focused),j.open&&(j.open=!1,c.off(".P"+j.id)),o.trigger("close")},clear:function(){return o.set("clear")},set:function(a,c,d){var e,f,g=b._.isObject(a),h=g?a:{};if(a){g||(h[a]=c);for(e in h)f=h[e],o.component.item[e]&&o.component.set(e,f,d||{}),("select"==e||"clear"==e)&&m.val("clear"==e?"":b._.trigger(o.component.formats.toString,o.component,[k.format,o.component.get(e)])).trigger("change");o.render()}return o.trigger("set",h)},get:function(a,c){return a=a||"value",null!=j[a]?j[a]:"value"==a?d.value:o.component.item[a]?"string"==typeof c?b._.trigger(o.component.formats.toString,o.component,[c,o.component.get(a)]):o.component.get(a):void 0},on:function(a,c){var d,e,f=b._.isObject(a),g=f?a:{};if(a){f||(g[a]=c);for(d in g)e=g[d],j.methods[d]=j.methods[d]||[],j.methods[d].push(e)}return o},trigger:function(a,c){var d=j.methods[a];return d&&d.map(function(a){b._.trigger(a,o,[c])}),o}};return new n}var c=a(document);return b.klasses=function(a){return a=a||"picker",{picker:a,opened:a+"--opened",focused:a+"--focused",input:a+"__input",active:a+"__input--active",holder:a+"__holder",frame:a+"__frame",wrap:a+"__wrap",box:a+"__box"}},b._={group:function(a){for(var c,d="",e=b._.trigger(a.min,a);e<=b._.trigger(a.max,a,[e]);e+=a.i)c=b._.trigger(a.item,a,[e]),d+=b._.node(a.node,c[0],c[1],c[2]);return d},node:function(a,b,c,d){return b?(b=Array.isArray(b)?b.join(""):b,c=c?' class="'+c+'"':"",d=d?" "+d:"","<"+a+c+d+">"+b+""+a+">"):""},lead:function(a){return(10>a?"0":"")+a},trigger:function(a,b,c){return"function"==typeof a?a.apply(b,c||[]):a},digits:function(a){return/\d/.test(a[1])?2:1},isObject:function(a){return{}.toString.call(a).indexOf("Object")>-1},isDate:function(a){return{}.toString.call(a).indexOf("Date")>-1&&this.isInteger(a.getDate())},isInteger:function(a){return{}.toString.call(a).indexOf("Number")>-1&&0===a%1}},b.extend=function(c,d){a.fn[c]=function(e,f){var g=this.data(c);return"picker"==e?g:g&&"string"==typeof e?(b._.trigger(g[e],g,[f]),this):this.each(function(){var f=a(this);f.data(c)||new b(this,c,d,e)})},a.fn[c].defaults=d.defaults},b});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define("picker",["jquery"],a):this.Picker=a(jQuery)}(function(a){function b(d,e,f,g){function h(){return b._.node("div",b._.node("div",b._.node("div",b._.node("div",o.component.nodes(j.open),l.box),l.wrap),l.frame),l.holder)}function i(a){a.stopPropagation(),"focus"==a.type&&o.$root.addClass(l.focused),o.open()}if(!d)return b;var j={id:Math.abs(~~(1e9*Math.random()))},k=f?a.extend(!0,{},f.defaults,g):g||{},l=a.extend({},b.klasses(),k.klass),m=a(d),n=function(){return this.start()},o=n.prototype={constructor:n,$node:m,start:function(){return j&&j.start?o:(j.methods={},j.start=!0,j.open=!1,j.type=d.type,d.autofocus=d==document.activeElement,d.type="text",d.readOnly=!0,o.component=new f(o,k),o.$root=a(b._.node("div",h(),l.picker)).on({focusin:function(a){o.$root.removeClass(l.focused),a.stopPropagation()},mousedown:function(a){a.target!=o.$root.children()[0]&&a.stopPropagation()},click:function(c){var e=c.target,f=e.attributes.length?a(e):a(e).closest("[data-pick]"),g=f.data();e!=o.$root.children()[0]&&(c.stopPropagation(),a.contains(o.$root[0],document.activeElement)||d.focus(),g.nav&&!f.hasClass(l.navDisabled)?o.set("highlight",o.component.item.highlight,{nav:g.nav}):b._.isInteger(g.pick)&&!f.hasClass(l.disabled)?o.set("select",g.pick).close(!0):g.clear&&o.clear().close(!0))}}),k.formatSubmit&&(o._hidden=a('")[0]),m.addClass(l.input).on("focus.P"+j.id+" click.P"+j.id,i).on("change.P"+j.id,function(){o._hidden&&(o._hidden.value=d.value?b._.trigger(o.component.formats.toString,o.component,[k.formatSubmit,o.component.item.select]):"")}).on("keydown.P"+j.id,function(a){var b=a.keyCode,c=/^(8|46)$/.test(b);return 27==b?(o.close(),!1):((32==b||c||!j.open&&o.component.key[b])&&(a.preventDefault(),a.stopPropagation(),c?o.clear().close():o.open()),void 0)}).val(m.data("value")?b._.trigger(o.component.formats.toString,o.component,[k.format,o.component.item.select]):d.value).after(o._hidden).data(e,o),k.container?a(k.container).append(o.$root):m.after(o.$root),o.on({start:o.component.onStart,render:o.component.onRender,stop:o.component.onStop,open:o.component.onOpen,close:o.component.onClose,set:o.component.onSet}).on({start:k.onStart,render:k.onRender,stop:k.onStop,open:k.onOpen,close:k.onClose,set:k.onSet}),d.autofocus&&o.open(),o.trigger("start").trigger("render"))},render:function(a){return a?o.$root.html(h()):o.$root.find("."+l.box).html(o.component.nodes(j.open)),o.trigger("render")},stop:function(){return j.start?(o.close(),o._hidden&&o._hidden.parentNode.removeChild(o._hidden),o.$root.remove(),m.removeClass(l.input).off(".P"+j.id).removeData(e),d.type=j.type,d.readOnly=!1,o.trigger("stop"),j.methods={},j.start=!1,o):o},open:function(e){return j.open?o:(m.addClass(l.active),o.$root.addClass(l.opened),e!==!1&&(j.open=!0,m.focus(),c.on("click.P"+j.id+" focusin.P"+j.id,function(a){a.target!=d&&a.target!=document&&o.close()}).on("keydown.P"+j.id,function(c){var e=c.keyCode,f=o.component.key[e],g=c.target;27==e?o.close(!0):g!=d||!f&&13!=e?a.contains(o.$root[0],g)&&13==e&&(c.preventDefault(),g.click()):(c.preventDefault(),f?b._.trigger(o.component.key.go,o,[f]):o.$root.find("."+l.highlighted).hasClass(l.disabled)||o.set("select",o.component.item.highlight).close())})),o.trigger("open"))},close:function(a){return a&&(m.off("focus.P"+j.id).focus(),setTimeout(function(){m.on("focus.P"+j.id,i)},0)),m.removeClass(l.active),o.$root.removeClass(l.opened+" "+l.focused),j.open&&(j.open=!1,c.off(".P"+j.id)),o.trigger("close")},clear:function(){return o.set("clear")},set:function(a,c,d){var e,f,g=b._.isObject(a),h=g?a:{};if(a){g||(h[a]=c);for(e in h)f=h[e],o.component.item[e]&&o.component.set(e,f,d||{}),("select"==e||"clear"==e)&&m.val("clear"==e?"":b._.trigger(o.component.formats.toString,o.component,[k.format,o.component.get(e)])).trigger("change");o.render()}return o.trigger("set",h)},get:function(a,c){return a=a||"value",null!=j[a]?j[a]:"value"==a?d.value:o.component.item[a]?"string"==typeof c?b._.trigger(o.component.formats.toString,o.component,[c,o.component.get(a)]):o.component.get(a):void 0},on:function(a,c){var d,e,f=b._.isObject(a),g=f?a:{};if(a){f||(g[a]=c);for(d in g)e=g[d],j.methods[d]=j.methods[d]||[],j.methods[d].push(e)}return o},trigger:function(a,c){var d=j.methods[a];return d&&d.map(function(a){b._.trigger(a,o,[c])}),o}};return new n}var c=a(document);return b.klasses=function(a){return a=a||"picker",{picker:a,opened:a+"--opened",focused:a+"--focused",input:a+"__input",active:a+"__input--active",holder:a+"__holder",frame:a+"__frame",wrap:a+"__wrap",box:a+"__box"}},b._={group:function(a){for(var c,d="",e=b._.trigger(a.min,a);e<=b._.trigger(a.max,a,[e]);e+=a.i)c=b._.trigger(a.item,a,[e]),d+=b._.node(a.node,c[0],c[1],c[2]);return d},node:function(b,c,d,e){return c?(c=a.isArray(c)?c.join(""):c,d=d?' class="'+d+'"':"",e=e?" "+e:"","<"+b+d+e+">"+c+""+b+">"):""},lead:function(a){return(10>a?"0":"")+a},trigger:function(a,b,c){return"function"==typeof a?a.apply(b,c||[]):a},digits:function(a){return/\d/.test(a[1])?2:1},isObject:function(a){return{}.toString.call(a).indexOf("Object")>-1},isDate:function(a){return{}.toString.call(a).indexOf("Date")>-1&&this.isInteger(a.getDate())},isInteger:function(a){return{}.toString.call(a).indexOf("Number")>-1&&0===a%1}},b.extend=function(c,d){a.fn[c]=function(e,f){var g=this.data(c);return"picker"==e?g:g&&"string"==typeof e?(b._.trigger(g[e],g,[f]),this):this.each(function(){var f=a(this);f.data(c)||new b(this,c,d,e)})},a.fn[c].defaults=d.defaults},b});
\ No newline at end of file
diff --git a/lib/compressed/picker.time.js b/lib/compressed/picker.time.js
index ff44b89f..6af74b6a 100644
--- a/lib/compressed/picker.time.js
+++ b/lib/compressed/picker.time.js
@@ -1,5 +1,5 @@
/*!
- * Time picker for pickadate.js v3.2.0
+ * Time picker for pickadate.js v3.2.1
* http://amsul.github.io/pickadate.js/time.htm
*/
-!function(a){"function"==typeof define&&define.amd?define(["picker"],a):a(Picker)}(function(a){function b(a,b){var c=this,d=a.$node.data("value");c.settings=b,c.queue={interval:"i",min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"create validate",view:"create validate",disable:"flipItem",enable:"flipItem"},c.item={},c.item.interval=b.interval||30,c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return a[0]===!0?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now").set("select",d||a.$node[0].value||c.item.min,{format:d?b.formatSubmit:b.format}),c.key={40:1,38:-1,39:1,37:-1,go:function(a){c.set("highlight",c.item.highlight.pick+a*c.item.interval,{interval:a*c.item.interval}),this.render()}},a.on("render",function(){var d=a.$root.children(),e=d.find("."+b.klass.viewset);e.length?d[0].scrollTop=~~(e.position().top-2*e[0].clientHeight):console.warn("Nothing to viewset with",c.item.view)}).on("open",function(){a.$root.find("button").attr("disable",!1)}).on("close",function(){a.$root.find("button").attr("disable",!0)})}var c=24,d=60,e=12,f=c*d;b.prototype.set=function(a,b,c){var d=this;return d.item["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",d.item.select,c):"highlight"==a?d.set("view",d.item.highlight,c):"interval"==a?d.set("min",d.item.min,c).set("max",d.item.max,c):("flip"==a||"min"==a||"max"==a||"disable"==a||"enable"==a)&&d.item.select&&d.item.highlight&&("min"==a&&d.set("max",d.item.max,c),d.set("select",d.item.select,c).set("highlight",d.item.highlight,c)),d},b.prototype.get=function(a){return this.item[a]},b.prototype.create=function(b,e,g){var h=this;return e=void 0===e?b:e,a._.isObject(e)&&a._.isInteger(e.pick)?e=e.pick:Array.isArray(e)?e=+e[0]*d+ +e[1]:a._.isInteger(e)||(e=h.now(b,e,g)),"max"==b&&ec&&0===f?2:1:c=1,c*this.item.interval+f},b.prototype.normalize=function(a){return a-((0>a?this.item.interval:0)+a%this.item.interval)},b.prototype.measure=function(b,e,f){var g=this;return e?e===!0||a._.isInteger(e)?e=g.now(b,e,f):a._.isObject(e)&&a._.isInteger(e.pick)&&(e=g.normalize(e.pick,f)):e="min"==b?[0,0]:[c-1,d-1],e},b.prototype.validate=function(a,b,c){var d=this,e=c&&c.interval?c.interval:d.item.interval;return d.disabled(b)&&(b=d.shift(b,e)),b=d.scope(b),d.disabled(b)&&(b=d.shift(b,-1*e)),b},b.prototype.disabled=function(b){var c=this,d=c.item.disable.filter(function(d){return a._.isInteger(d)?b.hour==d:Array.isArray(d)?b.pick==c.create(d).pick:void 0}).length;return-1===c.item.enable?!d:d},b.prototype.shift=function(a,b){for(var c=this;c.disabled(a)&&(a=c.create(a.pick+=b||c.item.interval),!(a.pick<=c.item.min.pick||a.pick>=c.item.max.pick)););return a},b.prototype.scope=function(a){var b=this.item.min.pick,c=this.item.max.pick;return this.create(a.pick>c?c:a.pickb.time%f?"a.m.":"p.m."},A:function(a,b){return a?2:f/2>b.time%f?"AM":"PM"},toArray:function(a){return a.split(/(h{1,2}|H{1,2}|i|a|A|!.)/g)},toString:function(b,c){var d=this;return d.formats.toArray(b).map(function(b){return a._.trigger(d.formats[b],d,[0,c])||b.replace(/^!/,"")}).join("")}},b.prototype.flipItem=function(a,b){var c=this,d=c.item.disable,e=-1===c.item.enable;return"flip"==b?c.item.enable=e?1:-1:!e&&"enable"==a||e&&"disable"==a?d=c.removeDisabled(d,b):(!e&&"disable"==a||e&&"enable"==a)&&(d=c.addDisabled(d,b)),d},b.prototype.addDisabled=function(a,b){var c=this;return b.map(function(b){c.filterDisabled(a,b).length||a.push(b)}),a},b.prototype.removeDisabled=function(a,b){var c=this;return b.map(function(b){a=c.filterDisabled(a,b,1)}),a},b.prototype.filterDisabled=function(a,b,c){var d=Array.isArray(b);return a.filter(function(a){var e=!d&&b===a||d&&Array.isArray(a)&&b.toString()===a.toString();return c?!e:e})},b.prototype.i=function(b,c){return a._.isInteger(c)&&c>0?c:this.item.interval},b.prototype.nodes=function(b){var c=this,d=c.settings,e=c.item.select,f=c.item.highlight,g=c.item.view,h=c.item.disable;return a._.node("ul",a._.group({min:c.item.min.pick,max:c.item.max.pick,i:c.item.interval,node:"li",item:function(b){return b=c.create(b),[a._.trigger(c.formats.toString,c,[a._.trigger(d.formatLabel,c,[b])||d.format,b]),function(a,i){return e&&e.pick==i&&a.push(d.klass.selected),f&&f.pick==i&&a.push(d.klass.highlighted),g&&g.pick==i&&a.push(d.klass.viewset),h&&c.disabled(b)&&a.push(d.klass.disabled),a.join(" ")}([d.klass.listItem],b.pick),"data-pick="+b.pick]}})+a._.node("li",a._.node("button",d.clear,d.klass.buttonClear,"data-clear=1"+(b?"":" disable"))),d.klass.list)},b.defaults=function(a){return{clear:"Clear",format:"h:i A",interval:30,klass:{picker:a+" "+a+"--time",holder:a+"__holder",list:a+"__list",listItem:a+"__list-item",disabled:a+"__list-item--disabled",selected:a+"__list-item--selected",highlighted:a+"__list-item--highlighted",viewset:a+"__list-item--viewset",now:a+"__list-item--now",buttonClear:a+"__button--clear"}}}(a.klasses().picker),a.extend("pickatime",b)});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["picker"],a):a(Picker)}(function(a){function b(a,b){var c=this,d=a.$node.data("value");c.settings=b,c.queue={interval:"i",min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"create validate",view:"create validate",disable:"flipItem",enable:"flipItem"},c.item={},c.item.interval=b.interval||30,c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return a[0]===!0?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now").set("select",d||a.$node[0].value||c.item.min,{format:d?b.formatSubmit:b.format}),c.key={40:1,38:-1,39:1,37:-1,go:function(a){c.set("highlight",c.item.highlight.pick+a*c.item.interval,{interval:a*c.item.interval}),this.render()}},a.on("render",function(){var d=a.$root.children(),e=d.find("."+b.klass.viewset);e.length?d[0].scrollTop=~~(e.position().top-2*e[0].clientHeight):console.warn("Nothing to viewset with",c.item.view)}).on("open",function(){a.$root.find("button").attr("disable",!1)}).on("close",function(){a.$root.find("button").attr("disable",!0)})}var c=24,d=60,e=12,f=c*d;b.prototype.set=function(a,b,c){var d=this;return d.item["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",d.item.select,c):"highlight"==a?d.set("view",d.item.highlight,c):"interval"==a?d.set("min",d.item.min,c).set("max",d.item.max,c):("flip"==a||"min"==a||"max"==a||"disable"==a||"enable"==a)&&d.item.select&&d.item.highlight&&("min"==a&&d.set("max",d.item.max,c),d.set("select",d.item.select,c).set("highlight",d.item.highlight,c)),d},b.prototype.get=function(a){return this.item[a]},b.prototype.create=function(b,e,g){var h=this;return e=void 0===e?b:e,a._.isObject(e)&&a._.isInteger(e.pick)?e=e.pick:$.isArray(e)?e=+e[0]*d+ +e[1]:a._.isInteger(e)||(e=h.now(b,e,g)),"max"==b&&ec&&0===f?2:1:c=1,c*this.item.interval+f},b.prototype.normalize=function(a){return a-((0>a?this.item.interval:0)+a%this.item.interval)},b.prototype.measure=function(b,e,f){var g=this;return e?e===!0||a._.isInteger(e)?e=g.now(b,e,f):a._.isObject(e)&&a._.isInteger(e.pick)&&(e=g.normalize(e.pick,f)):e="min"==b?[0,0]:[c-1,d-1],e},b.prototype.validate=function(a,b,c){var d=this,e=c&&c.interval?c.interval:d.item.interval;return d.disabled(b)&&(b=d.shift(b,e)),b=d.scope(b),d.disabled(b)&&(b=d.shift(b,-1*e)),b},b.prototype.disabled=function(b){var c=this,d=c.item.disable.filter(function(d){return a._.isInteger(d)?b.hour==d:$.isArray(d)?b.pick==c.create(d).pick:void 0}).length;return-1===c.item.enable?!d:d},b.prototype.shift=function(a,b){for(var c=this;c.disabled(a)&&(a=c.create(a.pick+=b||c.item.interval),!(a.pick<=c.item.min.pick||a.pick>=c.item.max.pick)););return a},b.prototype.scope=function(a){var b=this.item.min.pick,c=this.item.max.pick;return this.create(a.pick>c?c:a.pickb.time%f?"a.m.":"p.m."},A:function(a,b){return a?2:f/2>b.time%f?"AM":"PM"},toArray:function(a){return a.split(/(h{1,2}|H{1,2}|i|a|A|!.)/g)},toString:function(b,c){var d=this;return d.formats.toArray(b).map(function(b){return a._.trigger(d.formats[b],d,[0,c])||b.replace(/^!/,"")}).join("")}},b.prototype.flipItem=function(a,b){var c=this,d=c.item.disable,e=-1===c.item.enable;return"flip"==b?c.item.enable=e?1:-1:!e&&"enable"==a||e&&"disable"==a?d=c.removeDisabled(d,b):(!e&&"disable"==a||e&&"enable"==a)&&(d=c.addDisabled(d,b)),d},b.prototype.addDisabled=function(a,b){var c=this;return b.map(function(b){c.filterDisabled(a,b).length||a.push(b)}),a},b.prototype.removeDisabled=function(a,b){var c=this;return b.map(function(b){a=c.filterDisabled(a,b,1)}),a},b.prototype.filterDisabled=function(a,b,c){var d=$.isArray(b);return a.filter(function(a){var e=!d&&b===a||d&&$.isArray(a)&&b.toString()===a.toString();return c?!e:e})},b.prototype.i=function(b,c){return a._.isInteger(c)&&c>0?c:this.item.interval},b.prototype.nodes=function(b){var c=this,d=c.settings,e=c.item.select,f=c.item.highlight,g=c.item.view,h=c.item.disable;return a._.node("ul",a._.group({min:c.item.min.pick,max:c.item.max.pick,i:c.item.interval,node:"li",item:function(b){return b=c.create(b),[a._.trigger(c.formats.toString,c,[a._.trigger(d.formatLabel,c,[b])||d.format,b]),function(a,i){return e&&e.pick==i&&a.push(d.klass.selected),f&&f.pick==i&&a.push(d.klass.highlighted),g&&g.pick==i&&a.push(d.klass.viewset),h&&c.disabled(b)&&a.push(d.klass.disabled),a.join(" ")}([d.klass.listItem],b.pick),"data-pick="+b.pick]}})+a._.node("li",a._.node("button",d.clear,d.klass.buttonClear,"data-clear=1"+(b?"":" disable"))),d.klass.list)},b.defaults=function(a){return{clear:"Clear",format:"h:i A",interval:30,klass:{picker:a+" "+a+"--time",holder:a+"__holder",list:a+"__list",listItem:a+"__list-item",disabled:a+"__list-item--disabled",selected:a+"__list-item--selected",highlighted:a+"__list-item--highlighted",viewset:a+"__list-item--viewset",now:a+"__list-item--now",buttonClear:a+"__button--clear"}}}(a.klasses().picker),a.extend("pickatime",b)});
\ No newline at end of file
diff --git a/lib/legacy.js b/lib/legacy.js
index 42277ca1..564e2e97 100644
--- a/lib/legacy.js
+++ b/lib/legacy.js
@@ -12,13 +12,6 @@
* Legacy browser support
*/
-// isArray support
-if ( !Array.isArray ) {
- Array.isArray = function( value ) {
- return {}.toString.call( value ) == '[object Array]'
- }
-}
-
// Map array support
if ( ![].map ) {
diff --git a/lib/picker.date.js b/lib/picker.date.js
index 519889d1..ccadea79 100644
--- a/lib/picker.date.js
+++ b/lib/picker.date.js
@@ -1,6 +1,6 @@
/*!
- * Date picker for pickadate.js v3.2.0
+ * Date picker for pickadate.js v3.2.1
* http://amsul.github.io/pickadate.js/date.htm
*/
@@ -188,7 +188,7 @@ DatePicker.prototype.create = function( type, value, options ) {
// If it’s an array, convert it into a date and make sure
// that it’s a valid date – otherwise default to today.
- else if ( Array.isArray( value ) ) {
+ else if ( $.isArray( value ) ) {
value = new Date( value[ 0 ], value[ 1 ], value[ 2 ] )
value = Picker._.isDate( value ) ? value : calendar.create().obj
}
@@ -320,7 +320,7 @@ DatePicker.prototype.validate = function( type, dateObject, options ) {
hasEnabledWeekdays = isInverted && calendar.item.disable.filter( function( value ) {
// If there’s a date, check where it is relative to the target.
- if ( Array.isArray( value ) ) {
+ if ( $.isArray( value ) ) {
var dateTime = calendar.create( value ).pick
if ( dateTime < dateObject.pick ) hasEnabledBeforeTarget = true
else if ( dateTime > dateObject.pick ) hasEnabledAfterTarget = true
@@ -412,7 +412,7 @@ DatePicker.prototype.disabled = function( dateObject ) {
}
// If it's an array, create the object and match the exact date.
- if ( Array.isArray( dateToDisable ) ) {
+ if ( $.isArray( dateToDisable ) ) {
return dateObject.pick === calendar.create( dateToDisable ).pick
}
}).length
@@ -434,7 +434,7 @@ DatePicker.prototype.parse = function( type, value, options ) {
var calendar = this,
parsingObject = {}
- if ( !value || Picker._.isInteger( value ) || Array.isArray( value ) || Picker._.isDate( value ) || Picker._.isObject( value ) && Picker._.isInteger( value.pick ) ) {
+ if ( !value || Picker._.isInteger( value ) || $.isArray( value ) || Picker._.isDate( value ) || Picker._.isObject( value ) && Picker._.isInteger( value.pick ) ) {
return value
}
@@ -632,10 +632,10 @@ DatePicker.prototype.removeDisabled = function( collection, item ) {
* Filter through the disabled collection to find a time unit.
*/
DatePicker.prototype.filterDisabled = function( collection, timeUnit, isRemoving ) {
- var timeIsArray = Array.isArray( timeUnit )
+ var timeIsArray = $.isArray( timeUnit )
return collection.filter( function( disabledTimeUnit ) {
var isMatch = !timeIsArray && timeUnit === disabledTimeUnit ||
- timeIsArray && Array.isArray( disabledTimeUnit ) && timeUnit.toString() === disabledTimeUnit.toString()
+ timeIsArray && $.isArray( disabledTimeUnit ) && timeUnit.toString() === disabledTimeUnit.toString()
return isRemoving ? !isMatch : isMatch
})
} //DatePicker.prototype.filterDisabled
diff --git a/lib/picker.js b/lib/picker.js
index fe516562..7df17e26 100644
--- a/lib/picker.js
+++ b/lib/picker.js
@@ -1,6 +1,6 @@
/*!
- * pickadate.js v3.2.0, 2013/08/24
+ * pickadate.js v3.2.1, 2013/08/24
* By Amsul, http://amsul.ca
* Hosted on http://amsul.github.io/pickadate.js
* Licensed under MIT
@@ -130,7 +130,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
event.stopPropagation()
// If nothing inside is actively focused, re-focus the element.
- if ( !P.$root.find( document.activeElement ).length ) {
+ if ( !$.contains( P.$root[0], document.activeElement ) ) {
ELEMENT.focus()
}
@@ -154,9 +154,11 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
// If there’s a format for the hidden input element, create the element
- // using the name of the original input plus suffix. Otherwise set it to null.
+ // using the name of the original input plus suffix. Otherwise set it to undefined.
// If the element has a value, use either the `data-value` or `value`.
- P._hidden = SETTINGS.formatSubmit ? $( '' )[ 0 ] : undefined
+ if ( SETTINGS.formatSubmit ) {
+ P._hidden = $( '' )[ 0 ]
+ }
// Add the class and bind the events on the element.
@@ -366,7 +368,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
// If the target is within the root and “enter” is pressed,
// prevent the default action and trigger a click on the target instead.
- else if ( P.$root.find( target ).length && keycode == 13 ) {
+ else if ( $.contains( P.$root[0], target ) && keycode == 13 ) {
event.preventDefault()
target.click()
}
@@ -687,7 +689,7 @@ PickerConstructor._ = {
if ( !item ) return ''
// If the item is an array, do a join
- item = Array.isArray( item ) ? item.join( '' ) : item
+ item = $.isArray( item ) ? item.join( '' ) : item
// Check for the class
klass = klass ? ' class="' + klass + '"' : ''
diff --git a/lib/picker.time.js b/lib/picker.time.js
index 9b4b1aff..e4a40644 100644
--- a/lib/picker.time.js
+++ b/lib/picker.time.js
@@ -1,6 +1,6 @@
/*!
- * Time picker for pickadate.js v3.2.0
+ * Time picker for pickadate.js v3.2.1
* http://amsul.github.io/pickadate.js/time.htm
*/
@@ -182,7 +182,7 @@ TimePicker.prototype.create = function( type, value, options ) {
}
// If it's an array, convert it into minutes.
- else if ( Array.isArray( value ) ) {
+ else if ( $.isArray( value ) ) {
value = +value[ 0 ] * MINUTES_IN_HOUR + (+value[ 1 ])
}
@@ -323,7 +323,7 @@ TimePicker.prototype.disabled = function( timeObject ) {
}
// If it's an array, create the object and match the times.
- if ( Array.isArray( timeToDisable ) ) {
+ if ( $.isArray( timeToDisable ) ) {
return timeObject.pick == clock.create( timeToDisable ).pick
}
}).length
@@ -377,7 +377,7 @@ TimePicker.prototype.parse = function( type, value, options ) {
clock = this,
parsingObject = {}
- if ( !value || Picker._.isInteger( value ) || Array.isArray( value ) || Picker._.isDate( value ) || Picker._.isObject( value ) && Picker._.isInteger( value.pick ) ) {
+ if ( !value || Picker._.isInteger( value ) || $.isArray( value ) || Picker._.isDate( value ) || Picker._.isObject( value ) && Picker._.isInteger( value.pick ) ) {
return value
}
@@ -533,10 +533,10 @@ TimePicker.prototype.removeDisabled = function( collection, item ) {
* Filter through the disabled collection to find a time unit.
*/
TimePicker.prototype.filterDisabled = function( collection, timeUnit, isRemoving ) {
- var timeIsArray = Array.isArray( timeUnit )
+ var timeIsArray = $.isArray( timeUnit )
return collection.filter( function( disabledTimeUnit ) {
var isMatch = !timeIsArray && timeUnit === disabledTimeUnit ||
- timeIsArray && Array.isArray( disabledTimeUnit ) && timeUnit.toString() === disabledTimeUnit.toString()
+ timeIsArray && $.isArray( disabledTimeUnit ) && timeUnit.toString() === disabledTimeUnit.toString()
return isRemoving ? !isMatch : isMatch
})
} //TimePicker.prototype.filterDisabled
diff --git a/package.json b/package.json
index e46aa908..86ebf55a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "pickadate",
- "version": "3.2.0",
+ "version": "3.2.1",
"title": "pickadate.js",
"description": "The mobile-friendly, responsive, and lightweight jQuery date & time input picker.",
"author": {
diff --git a/pickadate.jquery.json b/pickadate.jquery.json
index e46aa908..86ebf55a 100644
--- a/pickadate.jquery.json
+++ b/pickadate.jquery.json
@@ -1,6 +1,6 @@
{
"name": "pickadate",
- "version": "3.2.0",
+ "version": "3.2.1",
"title": "pickadate.js",
"description": "The mobile-friendly, responsive, and lightweight jQuery date & time input picker.",
"author": {
diff --git a/time.htm b/time.htm
index 3cc75561..7ad00148 100644
--- a/time.htm
+++ b/time.htm
@@ -9,7 +9,7 @@
-pickadate.js / time
+pickadate.js / time