pickadate-rails 3.5.4.0 → 3.5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/pickadate-rails/version.rb +1 -1
- data/vendor/assets/javascripts/pickadate/picker.date.js +17 -22
- data/vendor/assets/javascripts/pickadate/picker.js +11 -10
- data/vendor/assets/javascripts/pickadate/picker.time.js +1 -1
- data/vendor/assets/javascripts/pickadate/translations/es_ES.js +0 -1
- data/vendor/assets/javascripts/pickadate/translations/fr_FR.js +0 -1
- data/vendor/assets/javascripts/pickadate/translations/it_IT.js +2 -3
- data/vendor/assets/javascripts/pickadate/translations/ru_RU.js +2 -3
- data/vendor/assets/javascripts/pickadate/translations/sk_SK.js +2 -3
- data/vendor/assets/stylesheets/pickadate/classic.time.css +0 -1
- data/vendor/assets/stylesheets/pickadate/default.time.css +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71f85c73882c8868e11fc979a535a49ed0e9cf51
|
4
|
+
data.tar.gz: 887c27301050e47bc7e418e715ab36741d8b6632
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58bb5aa19b5e32deabc967af127498d3f77ce64911328dd1ffb107445d8fa3d93d1c8e49d178af48e9d88e4f2ff4c3424777428d80c895c80bff4117a5a9e399
|
7
|
+
data.tar.gz: 8db797f6ad25dd499d114578d4fa7780fa83137196cc05328032f2aa6bd2e12f6b5adbb765d4b2514f5def11021e85e2729753d39da33c4dc7e1ba11dadfe715
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Pickadate-Rails [](http://badge.fury.io/rb/pickadate-rails)
|
2
2
|
|
3
|
-
## Pickadate Version: 3.5.
|
3
|
+
## Pickadate Version: 3.5.5
|
4
4
|
|
5
5
|
Easily add [pickadate.js](https://github.com/amsul/pickadate.js) to your Rails 3.1+ application using the asset pipeline.
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
/*!
|
3
|
-
* Date picker for pickadate.js v3.5.
|
3
|
+
* Date picker for pickadate.js v3.5.3
|
4
4
|
* http://amsul.github.io/pickadate.js/date.htm
|
5
5
|
*/
|
6
6
|
|
@@ -102,10 +102,10 @@ function DatePicker( picker, settings ) {
|
|
102
102
|
37: function() { return isRTL() ? 1 : -1 }, // Left
|
103
103
|
go: function( timeChange ) {
|
104
104
|
var highlightedObject = calendar.item.highlight,
|
105
|
-
targetDate = new Date(
|
105
|
+
targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )
|
106
106
|
calendar.set(
|
107
107
|
'highlight',
|
108
|
-
targetDate,
|
108
|
+
[ targetDate.getFullYear(), targetDate.getMonth(), targetDate.getDate() ],
|
109
109
|
{ interval: timeChange }
|
110
110
|
)
|
111
111
|
this.render()
|
@@ -222,20 +222,15 @@ DatePicker.prototype.create = function( type, value, options ) {
|
|
222
222
|
// If it’s an array, convert it into a date and make sure
|
223
223
|
// that it’s a valid date – otherwise default to today.
|
224
224
|
else if ( $.isArray( value ) ) {
|
225
|
-
value = new Date(
|
225
|
+
value = new Date( value[ 0 ], value[ 1 ], value[ 2 ] )
|
226
226
|
value = _.isDate( value ) ? value : calendar.create().obj
|
227
227
|
}
|
228
228
|
|
229
|
-
// If it’s a number, make a normalized date.
|
230
|
-
else if ( _.isInteger( value ) ) {
|
229
|
+
// If it’s a number or date object, make a normalized date.
|
230
|
+
else if ( _.isInteger( value ) || _.isDate( value ) ) {
|
231
231
|
value = calendar.normalize( new Date( value ), options )
|
232
232
|
}
|
233
233
|
|
234
|
-
// If it’s a date object, make a normalized date.
|
235
|
-
else if ( _.isDate( value ) ) {
|
236
|
-
value = calendar.normalize( value, options )
|
237
|
-
}
|
238
|
-
|
239
234
|
// If it’s a literal true or any other case, set it to now.
|
240
235
|
else /*if ( value === true )*/ {
|
241
236
|
value = calendar.now( type, value, options )
|
@@ -243,10 +238,10 @@ DatePicker.prototype.create = function( type, value, options ) {
|
|
243
238
|
|
244
239
|
// Return the compiled object.
|
245
240
|
return {
|
246
|
-
year: isInfiniteValue || value.
|
247
|
-
month: isInfiniteValue || value.
|
248
|
-
date: isInfiniteValue || value.
|
249
|
-
day: isInfiniteValue || value.
|
241
|
+
year: isInfiniteValue || value.getFullYear(),
|
242
|
+
month: isInfiniteValue || value.getMonth(),
|
243
|
+
date: isInfiniteValue || value.getDate(),
|
244
|
+
day: isInfiniteValue || value.getDay(),
|
250
245
|
obj: isInfiniteValue || value,
|
251
246
|
pick: isInfiniteValue || value.getTime()
|
252
247
|
}
|
@@ -321,7 +316,7 @@ DatePicker.prototype.overlapRanges = function( one, two ) {
|
|
321
316
|
DatePicker.prototype.now = function( type, value, options ) {
|
322
317
|
value = new Date()
|
323
318
|
if ( options && options.rel ) {
|
324
|
-
value.
|
319
|
+
value.setDate( value.getDate() + options.rel )
|
325
320
|
}
|
326
321
|
return this.normalize( value, options )
|
327
322
|
}
|
@@ -363,13 +358,13 @@ DatePicker.prototype.navigate = function( type, value, options ) {
|
|
363
358
|
}
|
364
359
|
|
365
360
|
// Figure out the expected target year and month.
|
366
|
-
targetDateObject = new Date(
|
367
|
-
targetYear = targetDateObject.
|
368
|
-
targetMonth = targetDateObject.
|
361
|
+
targetDateObject = new Date( targetYear, targetMonth + ( options && options.nav ? options.nav : 0 ), 1 )
|
362
|
+
targetYear = targetDateObject.getFullYear()
|
363
|
+
targetMonth = targetDateObject.getMonth()
|
369
364
|
|
370
365
|
// If the month we’re going to doesn’t have enough days,
|
371
366
|
// keep decreasing the date until we reach the month’s last date.
|
372
|
-
while ( /*safety &&*/ new Date(
|
367
|
+
while ( /*safety &&*/ new Date( targetYear, targetMonth, targetDate ).getMonth() !== targetMonth ) {
|
373
368
|
targetDate -= 1
|
374
369
|
/*safety -= 1
|
375
370
|
if ( !safety ) {
|
@@ -388,7 +383,7 @@ DatePicker.prototype.navigate = function( type, value, options ) {
|
|
388
383
|
* Normalize a date by setting the hours to midnight.
|
389
384
|
*/
|
390
385
|
DatePicker.prototype.normalize = function( value/*, options*/ ) {
|
391
|
-
value.
|
386
|
+
value.setHours( 0, 0, 0, 0 )
|
392
387
|
return value
|
393
388
|
}
|
394
389
|
|
@@ -933,7 +928,7 @@ DatePicker.prototype.activate = function( type, datesToEnable ) {
|
|
933
928
|
if ( !matchFound[3] ) matchFound.push( 'inverted' )
|
934
929
|
}
|
935
930
|
else if ( _.isDate( unitToEnable ) ) {
|
936
|
-
matchFound = [ unitToEnable.
|
931
|
+
matchFound = [ unitToEnable.getFullYear(), unitToEnable.getMonth(), unitToEnable.getDate(), 'inverted' ]
|
937
932
|
}
|
938
933
|
break
|
939
934
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* pickadate.js v3.5.
|
2
|
+
* pickadate.js v3.5.3, 2014/07/12
|
3
3
|
* By Amsul, http://amsul.ca
|
4
4
|
* Hosted on http://amsul.github.io/pickadate.js
|
5
5
|
* Licensed under MIT
|
@@ -684,7 +684,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
684
684
|
}).
|
685
685
|
|
686
686
|
// If there’s a click on an actionable element, carry out the actions.
|
687
|
-
on( 'click', '[data-pick], [data-nav], [data-clear]
|
687
|
+
on( 'click', '[data-pick], [data-nav], [data-clear]', function() {
|
688
688
|
|
689
689
|
var $target = $( this ),
|
690
690
|
targetData = $target.data(),
|
@@ -701,12 +701,12 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
701
701
|
}
|
702
702
|
|
703
703
|
// If something is superficially changed, update the `highlight` based on the `nav`.
|
704
|
-
if (
|
704
|
+
if ( targetData.nav && !targetDisabled ) {
|
705
705
|
P.set( 'highlight', P.component.item.highlight, { nav: targetData.nav } )
|
706
706
|
}
|
707
707
|
|
708
708
|
// If something is picked, set `select` then close with focus.
|
709
|
-
else if (
|
709
|
+
else if ( PickerConstructor._.isInteger( targetData.pick ) && !targetDisabled ) {
|
710
710
|
P.set( 'select', targetData.pick ).close( true )
|
711
711
|
}
|
712
712
|
|
@@ -714,11 +714,9 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
714
714
|
else if ( targetData.clear ) {
|
715
715
|
P.clear().close( true )
|
716
716
|
}
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
}
|
721
|
-
|
717
|
+
})
|
718
|
+
.on('click', '[data-close]', function () {
|
719
|
+
P.close(true);
|
722
720
|
}) //P.$root
|
723
721
|
|
724
722
|
aria( P.$root[0], 'hidden', true )
|
@@ -751,6 +749,9 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
751
749
|
// Create the name using the original input’s with a prefix and suffix.
|
752
750
|
'name="' + name + '"' +
|
753
751
|
|
752
|
+
// Create the ID using the original input’s; only if it has one.
|
753
|
+
(ELEMENT.id ? 'id="' + ELEMENT.id + '_hidden"' : '') +
|
754
|
+
|
754
755
|
// If the element has a value, set the hidden value as well.
|
755
756
|
(
|
756
757
|
$ELEMENT.data('value') || ELEMENT.value ?
|
@@ -978,7 +979,7 @@ PickerConstructor._ = {
|
|
978
979
|
* Tell if something is a date object.
|
979
980
|
*/
|
980
981
|
isDate: function( value ) {
|
981
|
-
return {}.toString.call( value ).indexOf( 'Date' ) > -1 && this.isInteger( value.
|
982
|
+
return {}.toString.call( value ).indexOf( 'Date' ) > -1 && this.isInteger( value.getDate() )
|
982
983
|
},
|
983
984
|
|
984
985
|
|
@@ -5,9 +5,8 @@ jQuery.extend( jQuery.fn.pickadate.defaults, {
|
|
5
5
|
monthsShort: [ 'gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic' ],
|
6
6
|
weekdaysFull: [ 'domenica', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato' ],
|
7
7
|
weekdaysShort: [ 'dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab' ],
|
8
|
-
today: '
|
9
|
-
clear: '
|
10
|
-
close: 'Chiudi',
|
8
|
+
today: 'oggi',
|
9
|
+
clear: 'cancellare',
|
11
10
|
firstDay: 1,
|
12
11
|
format: 'dddd d mmmm yyyy',
|
13
12
|
formatSubmit: 'yyyy/mm/dd'
|
@@ -1,13 +1,12 @@
|
|
1
1
|
// Russian
|
2
2
|
|
3
3
|
jQuery.extend( jQuery.fn.pickadate.defaults, {
|
4
|
-
monthsFull: [ '
|
5
|
-
monthsShort: [ '
|
4
|
+
monthsFull: [ 'Января', 'Февраля', 'Марта', 'Апреля', 'Мая', 'Июня', 'Июля', 'Августа', 'Сентября', 'Октября', 'Ноября', 'Декабря' ],
|
5
|
+
monthsShort: [ 'Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек' ],
|
6
6
|
weekdaysFull: [ 'воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота' ],
|
7
7
|
weekdaysShort: [ 'вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ],
|
8
8
|
today: 'сегодня',
|
9
9
|
clear: 'удалить',
|
10
|
-
close: 'закрыть',
|
11
10
|
firstDay: 1,
|
12
11
|
format: 'd mmmm yyyy г.',
|
13
12
|
formatSubmit: 'yyyy/mm/dd'
|
@@ -2,12 +2,11 @@
|
|
2
2
|
|
3
3
|
jQuery.extend( jQuery.fn.pickadate.defaults, {
|
4
4
|
monthsFull: [ 'január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december' ],
|
5
|
-
monthsShort: [ '
|
6
|
-
weekdaysFull: [ '
|
5
|
+
monthsShort: [ 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII' ],
|
6
|
+
weekdaysFull: [ 'nedeļľa', 'pondelok', 'utorok', 'streda', 'š̌švrtok', 'piatok', 'sobota' ],
|
7
7
|
weekdaysShort: [ 'Ne', 'Po', 'Ut', 'St', 'Št', 'Pi', 'So' ],
|
8
8
|
today: 'dnes',
|
9
9
|
clear: 'vymazať',
|
10
|
-
close: 'zavrieť',
|
11
10
|
firstDay: 1,
|
12
11
|
format: 'd. mmmm yyyy',
|
13
12
|
formatSubmit: 'yyyy/mm/dd'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pickadate-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Fraser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|