pickadate-rails 1.2.2 → 1.3.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 +63 -28
- data/vendor/assets/javascripts/pickadate/picker.js +23 -8
- data/vendor/assets/javascripts/pickadate/picker.time.js +54 -27
- data/vendor/assets/stylesheets/pickadate/classic.css +1 -73
- data/vendor/assets/stylesheets/pickadate/classic.date.css +1 -77
- data/vendor/assets/stylesheets/pickadate/classic.time.css +2 -73
- data/vendor/assets/stylesheets/pickadate/default.css +1 -73
- data/vendor/assets/stylesheets/pickadate/default.date.css +1 -77
- data/vendor/assets/stylesheets/pickadate/default.time.css +2 -73
- 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: 8bff9abfe44be28299cf0476db7df35d0f06a2eb
|
4
|
+
data.tar.gz: aa22306029c2d465c55af70a43cd96c196c91adf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2875e44174b3f403691b2ad4e8988333b48523f484253b4a8ad97d590e4a9fb7f5aaaed49cdfbe486fddf6d4b68d31e36768ec5e42f9c3eaebf202aa25e91ee1
|
7
|
+
data.tar.gz: 164be77a8e98e992f0f2779893c16737f6397c55b922fd71ccd2cce9b66b38bfb73f4fcd808e1c1a903d35910cac4fbdbe8f3ddd70c7d89f6aaf9376c00df004
|
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.
|
3
|
+
## Pickadate Version: 3.3.0
|
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.
|
3
|
+
* Date picker for pickadate.js v3.3.0
|
4
4
|
* http://amsul.github.io/pickadate.js/date.htm
|
5
5
|
*/
|
6
6
|
|
@@ -17,12 +17,12 @@
|
|
17
17
|
|
18
18
|
// Register as an anonymous module.
|
19
19
|
if ( typeof define === 'function' && define.amd )
|
20
|
-
define( ['picker'], factory )
|
20
|
+
define( ['picker','jquery'], factory )
|
21
21
|
|
22
22
|
// Or using browser globals.
|
23
|
-
else factory( Picker )
|
23
|
+
else factory( Picker, jQuery )
|
24
24
|
|
25
|
-
}(function( Picker ) {
|
25
|
+
}(function( Picker, $ ) {
|
26
26
|
|
27
27
|
|
28
28
|
/**
|
@@ -42,7 +42,10 @@ function DatePicker( picker, settings ) {
|
|
42
42
|
elementValue = picker.$node[ 0 ].value,
|
43
43
|
elementDataValue = picker.$node.data( 'value' ),
|
44
44
|
valueString = elementDataValue || elementValue,
|
45
|
-
formatString = elementDataValue ? settings.formatSubmit : settings.format
|
45
|
+
formatString = elementDataValue ? settings.formatSubmit : settings.format,
|
46
|
+
isRTL = function() {
|
47
|
+
return getComputedStyle( picker.$root[0] ).direction === 'rtl'
|
48
|
+
}
|
46
49
|
|
47
50
|
calendar.settings = settings
|
48
51
|
|
@@ -93,8 +96,8 @@ function DatePicker( picker, settings ) {
|
|
93
96
|
calendar.key = {
|
94
97
|
40: 7, // Down
|
95
98
|
38: -7, // Up
|
96
|
-
39: 1, // Right
|
97
|
-
37: -1, // Left
|
99
|
+
39: function() { return isRTL() ? -1 : 1 }, // Right
|
100
|
+
37: function() { return isRTL() ? 1 : -1 }, // Left
|
98
101
|
go: function( timeChange ) {
|
99
102
|
calendar.set( 'highlight', [ calendar.item.highlight.year, calendar.item.highlight.month, calendar.item.highlight.date + timeChange ], { interval: timeChange } )
|
100
103
|
this.render()
|
@@ -107,11 +110,11 @@ function DatePicker( picker, settings ) {
|
|
107
110
|
on( 'render', function() {
|
108
111
|
picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {
|
109
112
|
picker.set( 'highlight', [ picker.get( 'view' ).year, this.value, picker.get( 'highlight' ).date ] )
|
110
|
-
picker.$root.find( '.' + settings.klass.selectMonth ).focus
|
113
|
+
picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )
|
111
114
|
})
|
112
115
|
picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {
|
113
116
|
picker.set( 'highlight', [ this.value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )
|
114
|
-
picker.$root.find( '.' + settings.klass.selectYear ).focus
|
117
|
+
picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )
|
115
118
|
})
|
116
119
|
}).
|
117
120
|
on( 'open', function() {
|
@@ -397,32 +400,33 @@ DatePicker.prototype.validate = function( type, dateObject, options ) {
|
|
397
400
|
|
398
401
|
|
399
402
|
/**
|
400
|
-
* Check if
|
403
|
+
* Check if a date is disabled.
|
401
404
|
*/
|
402
405
|
DatePicker.prototype.disabled = function( dateObject ) {
|
403
406
|
|
404
407
|
var calendar = this,
|
405
408
|
|
406
409
|
// Filter through the disabled dates to check if this is one.
|
407
|
-
isDisabledDate = calendar.item.disable.filter( function( dateToDisable ) {
|
410
|
+
isDisabledDate = !!calendar.item.disable.filter( function( dateToDisable ) {
|
408
411
|
|
409
412
|
// If the date is a number, match the weekday with 0index and `firstDay` check.
|
410
413
|
if ( Picker._.isInteger( dateToDisable ) ) {
|
411
414
|
return dateObject.day === ( calendar.settings.firstDay ? dateToDisable : dateToDisable - 1 ) % 7
|
412
415
|
}
|
413
416
|
|
414
|
-
// If it
|
415
|
-
if ( $.isArray( dateToDisable ) ) {
|
417
|
+
// If it’s an array or a native JS date, create and match the exact date.
|
418
|
+
if ( $.isArray( dateToDisable ) || Picker._.isDate( dateToDisable ) ) {
|
416
419
|
return dateObject.pick === calendar.create( dateToDisable ).pick
|
417
420
|
}
|
418
421
|
}).length
|
419
422
|
|
420
423
|
|
421
|
-
//
|
422
|
-
//
|
423
|
-
return
|
424
|
-
dateObject.pick
|
425
|
-
calendar.item.
|
424
|
+
// Check the calendar “enabled” flag and respectively flip the
|
425
|
+
// disabled state. Then also check if it’s beyond the min/max limits.
|
426
|
+
return calendar.item.enable === -1 ? !isDisabledDate : isDisabledDate ||
|
427
|
+
dateObject.pick < calendar.item.min.pick ||
|
428
|
+
dateObject.pick > calendar.item.max.pick
|
429
|
+
|
426
430
|
} //DatePicker.prototype.disabled
|
427
431
|
|
428
432
|
|
@@ -590,12 +594,28 @@ DatePicker.prototype.flipItem = function( type, value/*, options*/ ) {
|
|
590
594
|
calendar.item.enable = isInverted ? 1 : -1
|
591
595
|
}
|
592
596
|
|
593
|
-
//
|
594
|
-
else if (
|
595
|
-
|
597
|
+
// Reset the collection and enable the base state.
|
598
|
+
else if ( ( type == 'enable' && value === true ) || ( type == 'disable' && value === false ) ) {
|
599
|
+
calendar.item.enable = 1
|
600
|
+
collection = []
|
601
|
+
}
|
602
|
+
|
603
|
+
// Reset the collection and disable the base state.
|
604
|
+
else if ( ( type == 'enable' && value === false ) || ( type == 'disable' && value === true ) ) {
|
605
|
+
calendar.item.enable = -1
|
606
|
+
collection = []
|
596
607
|
}
|
597
|
-
|
598
|
-
|
608
|
+
|
609
|
+
// Make sure a collection of things was passed to add/remove.
|
610
|
+
else if ( $.isArray( value ) ) {
|
611
|
+
|
612
|
+
// Check if we have to add/remove from collection.
|
613
|
+
if ( !isInverted && type == 'enable' || isInverted && type == 'disable' ) {
|
614
|
+
collection = calendar.removeDisabled( collection, value )
|
615
|
+
}
|
616
|
+
else if ( !isInverted && type == 'disable' || isInverted && type == 'enable' ) {
|
617
|
+
collection = calendar.addDisabled( collection, value )
|
618
|
+
}
|
599
619
|
}
|
600
620
|
|
601
621
|
return collection
|
@@ -632,10 +652,24 @@ DatePicker.prototype.removeDisabled = function( collection, item ) {
|
|
632
652
|
* Filter through the disabled collection to find a time unit.
|
633
653
|
*/
|
634
654
|
DatePicker.prototype.filterDisabled = function( collection, timeUnit, isRemoving ) {
|
635
|
-
|
655
|
+
|
656
|
+
var calendar = this,
|
657
|
+
|
658
|
+
// Check if the time unit passed is an array or date object.
|
659
|
+
timeIsObject = $.isArray( timeUnit ) || Picker._.isDate( timeUnit ),
|
660
|
+
|
661
|
+
// Grab the comparison value if it’s an object.
|
662
|
+
timeObjectValue = timeIsObject && calendar.create( timeUnit ).pick
|
663
|
+
|
664
|
+
// Go through the disabled collection and try to match this time unit.
|
636
665
|
return collection.filter( function( disabledTimeUnit ) {
|
637
|
-
|
638
|
-
|
666
|
+
|
667
|
+
// Check if it’s an object and the collection item is an object,
|
668
|
+
// use the comparison values. Otherwise to a direct comparison.
|
669
|
+
var isMatch = timeIsObject && ( $.isArray( disabledTimeUnit ) || Picker._.isDate( disabledTimeUnit ) ) ?
|
670
|
+
timeObjectValue === calendar.create( disabledTimeUnit ).pick : timeUnit === disabledTimeUnit
|
671
|
+
|
672
|
+
// Invert the match if we’re removing from the collection.
|
639
673
|
return isRemoving ? !isMatch : isMatch
|
640
674
|
})
|
641
675
|
} //DatePicker.prototype.filterDisabled
|
@@ -881,10 +915,11 @@ DatePicker.prototype.nodes = function( isOpen ) {
|
|
881
915
|
settings.klass.table
|
882
916
|
) +
|
883
917
|
|
918
|
+
// * For Firefox forms to submit, make sure to set the buttons’ `type` attributes as “button”.
|
884
919
|
Picker._.node(
|
885
920
|
'div',
|
886
|
-
Picker._.node( 'button', settings.today, settings.klass.buttonToday, 'data-pick=' + nowObject.pick + ( isOpen ? '' : ' disabled' ) ) +
|
887
|
-
Picker._.node( 'button', settings.clear, settings.klass.buttonClear, 'data-clear=1' + ( isOpen ? '' : ' disabled' ) ),
|
921
|
+
Picker._.node( 'button', settings.today, settings.klass.buttonToday, 'type=button data-pick=' + nowObject.pick + ( isOpen ? '' : ' disabled' ) ) +
|
922
|
+
Picker._.node( 'button', settings.clear, settings.klass.buttonClear, 'type=button data-clear=1' + ( isOpen ? '' : ' disabled' ) ),
|
888
923
|
settings.klass.footer
|
889
924
|
) //endreturn
|
890
925
|
} //DatePicker.prototype.nodes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
/*!
|
3
|
-
* pickadate.js v3.
|
3
|
+
* pickadate.js v3.3.0, 2013/10/13
|
4
4
|
* By Amsul, http://amsul.ca
|
5
5
|
* Hosted on http://amsul.github.io/pickadate.js
|
6
6
|
* Licensed under MIT
|
@@ -152,11 +152,26 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
152
152
|
}) //P.$root
|
153
153
|
|
154
154
|
|
155
|
-
// If there’s a format for the hidden input element, create the element
|
156
|
-
// using the name of the original input plus suffix. Otherwise set it to undefined.
|
157
|
-
// If the element has a value, use either the `data-value` or `value`.
|
155
|
+
// If there’s a format for the hidden input element, create the element.
|
158
156
|
if ( SETTINGS.formatSubmit ) {
|
159
|
-
|
157
|
+
|
158
|
+
P._hidden = $(
|
159
|
+
'<input ' +
|
160
|
+
'type=hidden ' +
|
161
|
+
|
162
|
+
// Create the name by using the original input plus a prefix and suffix.
|
163
|
+
'name="' + ( typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '' ) +
|
164
|
+
ELEMENT.name +
|
165
|
+
( typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit' ) +
|
166
|
+
'"' +
|
167
|
+
|
168
|
+
// If the element has a `data-value`, set the element `value` as well.
|
169
|
+
( $ELEMENT.data( 'value' ) ?
|
170
|
+
' value="' + PickerConstructor._.trigger( P.component.formats.toString, P.component, [ SETTINGS.formatSubmit, P.component.item.select ] ) + '"' :
|
171
|
+
''
|
172
|
+
) +
|
173
|
+
'>'
|
174
|
+
)[ 0 ]
|
160
175
|
}
|
161
176
|
|
162
177
|
|
@@ -317,7 +332,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
317
332
|
STATE.open = true
|
318
333
|
|
319
334
|
// Pass focus to the element’s jQuery object.
|
320
|
-
$ELEMENT.focus
|
335
|
+
$ELEMENT.trigger( 'focus' )
|
321
336
|
|
322
337
|
// Bind the document events.
|
323
338
|
$document.on( 'click.P' + STATE.id + ' focusin.P' + STATE.id, function( event ) {
|
@@ -355,7 +370,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
355
370
|
|
356
371
|
// Trigger the key movement action.
|
357
372
|
if ( keycodeToMove ) {
|
358
|
-
PickerConstructor._.trigger( P.component.key.go, P, [ keycodeToMove ] )
|
373
|
+
PickerConstructor._.trigger( P.component.key.go, P, [ PickerConstructor._.trigger( keycodeToMove ) ] )
|
359
374
|
}
|
360
375
|
|
361
376
|
// On “enter”, if the highlighted item isn’t disabled, set the value and close.
|
@@ -389,7 +404,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
|
|
389
404
|
// ....ah yes! It would’ve been incomplete without a crazy workaround for IE :|
|
390
405
|
// The focus is triggered *after* the close has completed - causing it
|
391
406
|
// to open again. So unbind and rebind the event at the next tick.
|
392
|
-
$ELEMENT.off( 'focus.P' + STATE.id ).focus
|
407
|
+
$ELEMENT.off( 'focus.P' + STATE.id ).trigger( 'focus' )
|
393
408
|
setTimeout( function() {
|
394
409
|
$ELEMENT.on( 'focus.P' + STATE.id, focusToOpen )
|
395
410
|
}, 0 )
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
/*!
|
3
|
-
* Time picker for pickadate.js v3.
|
3
|
+
* Time picker for pickadate.js v3.3.0
|
4
4
|
* http://amsul.github.io/pickadate.js/time.htm
|
5
5
|
*/
|
6
6
|
|
@@ -17,12 +17,12 @@
|
|
17
17
|
|
18
18
|
// Register as an anonymous module.
|
19
19
|
if ( typeof define === 'function' && define.amd )
|
20
|
-
define( ['picker'], factory )
|
20
|
+
define( ['picker','jquery'], factory )
|
21
21
|
|
22
22
|
// Or using browser globals.
|
23
|
-
else factory( Picker )
|
23
|
+
else factory( Picker, jQuery )
|
24
24
|
|
25
|
-
}(function( Picker ) {
|
25
|
+
}(function( Picker, $ ) {
|
26
26
|
|
27
27
|
|
28
28
|
/**
|
@@ -102,10 +102,7 @@ function TimePicker( picker, settings ) {
|
|
102
102
|
var $pickerHolder = picker.$root.children(),
|
103
103
|
$viewset = $pickerHolder.find( '.' + settings.klass.viewset )
|
104
104
|
if ( $viewset.length ) {
|
105
|
-
$pickerHolder[ 0 ].scrollTop
|
106
|
-
}
|
107
|
-
else {
|
108
|
-
console.warn( 'Nothing to viewset with', clock.item.view )
|
105
|
+
$pickerHolder[ 0 ].scrollTop += $viewset.position().top - ( $viewset[ 0 ].clientHeight * 2 )
|
109
106
|
}
|
110
107
|
}).
|
111
108
|
on( 'open', function() {
|
@@ -197,7 +194,7 @@ TimePicker.prototype.create = function( type, value, options ) {
|
|
197
194
|
}
|
198
195
|
|
199
196
|
// Normalize it into a "reachable" interval.
|
200
|
-
value = clock.normalize( value, options )
|
197
|
+
value = clock.normalize( type, value, options )
|
201
198
|
|
202
199
|
// Return the compiled object.
|
203
200
|
return {
|
@@ -243,11 +240,19 @@ TimePicker.prototype.now = function( type, value/*, options*/ ) {
|
|
243
240
|
|
244
241
|
|
245
242
|
/**
|
246
|
-
* Normalize minutes
|
243
|
+
* Normalize minutes to be “reachable” based on the min and interval.
|
247
244
|
*/
|
248
|
-
TimePicker.prototype.normalize = function( value/*, options*/ ) {
|
249
|
-
|
250
|
-
|
245
|
+
TimePicker.prototype.normalize = function( type, value/*, options*/ ) {
|
246
|
+
|
247
|
+
var minObject = this.item.min, interval = this.item.interval,
|
248
|
+
|
249
|
+
// If setting min and it doesn’t exist, don’t shift anything.
|
250
|
+
// Otherwise get the value and min difference and then
|
251
|
+
// normalize the difference with the interval.
|
252
|
+
difference = type == 'min' && !minObject ? 0 : ( value - minObject.pick ) % interval
|
253
|
+
|
254
|
+
// If it’s a negative value, add one interval to keep it as “passed”.
|
255
|
+
return value - ( difference + ( value < 0 ? interval : 0 ) )
|
251
256
|
} //TimePicker.prototype.normalize
|
252
257
|
|
253
258
|
|
@@ -270,7 +275,7 @@ TimePicker.prototype.measure = function( type, value, options ) {
|
|
270
275
|
|
271
276
|
// If it's an object already, just normalize it.
|
272
277
|
else if ( Picker._.isObject( value ) && Picker._.isInteger( value.pick ) ) {
|
273
|
-
value = clock.normalize( value.pick, options )
|
278
|
+
value = clock.normalize( type, value.pick, options )
|
274
279
|
}
|
275
280
|
|
276
281
|
return value
|
@@ -338,17 +343,20 @@ TimePicker.prototype.disabled = function( timeObject ) {
|
|
338
343
|
*/
|
339
344
|
TimePicker.prototype.shift = function( timeObject, interval ) {
|
340
345
|
|
341
|
-
var
|
342
|
-
|
346
|
+
var clock = this,
|
347
|
+
minLimit = clock.item.min.pick,
|
348
|
+
maxLimit = clock.item.max.pick
|
349
|
+
|
350
|
+
interval = interval || clock.item.interval
|
343
351
|
|
344
352
|
// Keep looping as long as the time is disabled.
|
345
353
|
while ( clock.disabled( timeObject ) ) {
|
346
354
|
|
347
355
|
// Increase/decrease the time by the interval and keep looping.
|
348
|
-
timeObject = clock.create( timeObject.pick += interval
|
356
|
+
timeObject = clock.create( timeObject.pick += interval )
|
349
357
|
|
350
358
|
// If we've looped beyond the limits, break out of the loop.
|
351
|
-
if ( timeObject.pick <=
|
359
|
+
if ( timeObject.pick <= minLimit || timeObject.pick >= maxLimit ) {
|
352
360
|
break
|
353
361
|
}
|
354
362
|
}
|
@@ -373,8 +381,7 @@ TimePicker.prototype.scope = function( timeObject ) {
|
|
373
381
|
*/
|
374
382
|
TimePicker.prototype.parse = function( type, value, options ) {
|
375
383
|
|
376
|
-
var
|
377
|
-
clock = this,
|
384
|
+
var clock = this,
|
378
385
|
parsingObject = {}
|
379
386
|
|
380
387
|
if ( !value || Picker._.isInteger( value ) || $.isArray( value ) || Picker._.isDate( value ) || Picker._.isObject( value ) && Picker._.isInteger( value.pick ) ) {
|
@@ -491,12 +498,28 @@ TimePicker.prototype.flipItem = function( type, value/*, options*/ ) {
|
|
491
498
|
clock.item.enable = isFlipped ? 1 : -1
|
492
499
|
}
|
493
500
|
|
494
|
-
//
|
495
|
-
else if (
|
496
|
-
|
501
|
+
// Reset the collection and enable the base state.
|
502
|
+
else if ( ( type == 'enable' && value === true ) || ( type == 'disable' && value === false ) ) {
|
503
|
+
clock.item.enable = 1
|
504
|
+
collection = []
|
497
505
|
}
|
498
|
-
|
499
|
-
|
506
|
+
|
507
|
+
// Reset the collection and disable the base state.
|
508
|
+
else if ( ( type == 'enable' && value === false ) || ( type == 'disable' && value === true ) ) {
|
509
|
+
clock.item.enable = -1
|
510
|
+
collection = []
|
511
|
+
}
|
512
|
+
|
513
|
+
// Make sure a collection of things was passed to add/remove.
|
514
|
+
else if ( $.isArray( value ) ) {
|
515
|
+
|
516
|
+
// Check if we have to add/remove from collection.
|
517
|
+
if ( !isFlipped && type == 'enable' || isFlipped && type == 'disable' ) {
|
518
|
+
collection = clock.removeDisabled( collection, value )
|
519
|
+
}
|
520
|
+
else if ( !isFlipped && type == 'disable' || isFlipped && type == 'enable' ) {
|
521
|
+
collection = clock.addDisabled( collection, value )
|
522
|
+
}
|
500
523
|
}
|
501
524
|
|
502
525
|
return collection
|
@@ -508,7 +531,8 @@ TimePicker.prototype.flipItem = function( type, value/*, options*/ ) {
|
|
508
531
|
*/
|
509
532
|
TimePicker.prototype.addDisabled = function( collection, item ) {
|
510
533
|
var clock = this
|
511
|
-
|
534
|
+
if ( item === false ) collection = []
|
535
|
+
else item.map( function( timeUnit ) {
|
512
536
|
if ( !clock.filterDisabled( collection, timeUnit ).length ) {
|
513
537
|
collection.push( timeUnit )
|
514
538
|
}
|
@@ -595,7 +619,10 @@ TimePicker.prototype.nodes = function( isOpen ) {
|
|
595
619
|
'data-pick=' + loopedTime.pick
|
596
620
|
]
|
597
621
|
}
|
598
|
-
}) +
|
622
|
+
}) +
|
623
|
+
|
624
|
+
// * For Firefox forms to submit, make sure to set the button’s `type` attribute as “button”.
|
625
|
+
Picker._.node( 'li', Picker._.node( 'button', settings.clear, settings.klass.buttonClear, 'type=button data-clear=1' + ( isOpen ? '' : ' disable' ) ) ), settings.klass.list )
|
599
626
|
} //TimePicker.prototype.nodes
|
600
627
|
|
601
628
|
|
@@ -1,42 +1,6 @@
|
|
1
1
|
/* ==========================================================================
|
2
2
|
$BASE-PICKER
|
3
3
|
========================================================================== */
|
4
|
-
/* ==========================================================================
|
5
|
-
$VARIABLES
|
6
|
-
========================================================================== */
|
7
|
-
/**
|
8
|
-
* Base colors
|
9
|
-
*/
|
10
|
-
/**
|
11
|
-
* Backgrounds
|
12
|
-
*/
|
13
|
-
/**
|
14
|
-
* Borders
|
15
|
-
*/
|
16
|
-
/**
|
17
|
-
* Buttons
|
18
|
-
*/
|
19
|
-
/**
|
20
|
-
* Picker base
|
21
|
-
*/
|
22
|
-
/**
|
23
|
-
* Date picker options
|
24
|
-
*/
|
25
|
-
/**
|
26
|
-
* Theme configurations
|
27
|
-
*/
|
28
|
-
/* ==========================================================================
|
29
|
-
$MIXINS
|
30
|
-
========================================================================== */
|
31
|
-
/**
|
32
|
-
* Common picker item states
|
33
|
-
*/
|
34
|
-
/**
|
35
|
-
* Opacity
|
36
|
-
*/
|
37
|
-
/**
|
38
|
-
* Vendor prefixes
|
39
|
-
*/
|
40
4
|
/**
|
41
5
|
* Note: the root picker element should __NOT__ be styled
|
42
6
|
* more than what’s here. Style the `.picker__holder` instead.
|
@@ -72,43 +36,7 @@
|
|
72
36
|
|
73
37
|
/*!
|
74
38
|
* Classic picker styling for pickadate.js
|
75
|
-
* Demo: http://amsul.github.io/pickadate.js
|
76
|
-
*/
|
77
|
-
/* ==========================================================================
|
78
|
-
$VARIABLES
|
79
|
-
========================================================================== */
|
80
|
-
/**
|
81
|
-
* Base colors
|
82
|
-
*/
|
83
|
-
/**
|
84
|
-
* Backgrounds
|
85
|
-
*/
|
86
|
-
/**
|
87
|
-
* Borders
|
88
|
-
*/
|
89
|
-
/**
|
90
|
-
* Buttons
|
91
|
-
*/
|
92
|
-
/**
|
93
|
-
* Picker base
|
94
|
-
*/
|
95
|
-
/**
|
96
|
-
* Date picker options
|
97
|
-
*/
|
98
|
-
/**
|
99
|
-
* Theme configurations
|
100
|
-
*/
|
101
|
-
/* ==========================================================================
|
102
|
-
$MIXINS
|
103
|
-
========================================================================== */
|
104
|
-
/**
|
105
|
-
* Common picker item states
|
106
|
-
*/
|
107
|
-
/**
|
108
|
-
* Opacity
|
109
|
-
*/
|
110
|
-
/**
|
111
|
-
* Vendor prefixes
|
39
|
+
* Demo: http://amsul.github.io/pickadate.js
|
112
40
|
*/
|
113
41
|
/**
|
114
42
|
* Note: the root picker element should __NOT__ be styled
|
@@ -1,42 +1,6 @@
|
|
1
1
|
/* ==========================================================================
|
2
2
|
$BASE-DATE-PICKER
|
3
3
|
========================================================================== */
|
4
|
-
/* ==========================================================================
|
5
|
-
$VARIABLES
|
6
|
-
========================================================================== */
|
7
|
-
/**
|
8
|
-
* Base colors
|
9
|
-
*/
|
10
|
-
/**
|
11
|
-
* Backgrounds
|
12
|
-
*/
|
13
|
-
/**
|
14
|
-
* Borders
|
15
|
-
*/
|
16
|
-
/**
|
17
|
-
* Buttons
|
18
|
-
*/
|
19
|
-
/**
|
20
|
-
* Picker base
|
21
|
-
*/
|
22
|
-
/**
|
23
|
-
* Date picker options
|
24
|
-
*/
|
25
|
-
/**
|
26
|
-
* Theme configurations
|
27
|
-
*/
|
28
|
-
/* ==========================================================================
|
29
|
-
$MIXINS
|
30
|
-
========================================================================== */
|
31
|
-
/**
|
32
|
-
* Common picker item states
|
33
|
-
*/
|
34
|
-
/**
|
35
|
-
* Opacity
|
36
|
-
*/
|
37
|
-
/**
|
38
|
-
* Vendor prefixes
|
39
|
-
*/
|
40
4
|
/**
|
41
5
|
* The picker box.
|
42
6
|
*/
|
@@ -74,7 +38,7 @@
|
|
74
38
|
font-size: .8em;
|
75
39
|
border: 1px solid #b7b7b7;
|
76
40
|
height: 2.5em;
|
77
|
-
padding: .
|
41
|
+
padding: .5em .25em;
|
78
42
|
margin-left: .25em;
|
79
43
|
margin-right: .25em;
|
80
44
|
margin-top: -0.5em;
|
@@ -211,10 +175,6 @@
|
|
211
175
|
}
|
212
176
|
.picker__day--outfocus {
|
213
177
|
color: #dddddd;
|
214
|
-
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=66)";
|
215
|
-
filter: alpha(opacity=66);
|
216
|
-
-moz-opacity: 0.66;
|
217
|
-
opacity: 0.66;
|
218
178
|
}
|
219
179
|
.picker__day--infocus:hover,
|
220
180
|
.picker__day--outfocus:hover {
|
@@ -294,39 +254,3 @@
|
|
294
254
|
/* ==========================================================================
|
295
255
|
$CLASSIC-DATE-PICKER
|
296
256
|
========================================================================== */
|
297
|
-
/* ==========================================================================
|
298
|
-
$VARIABLES
|
299
|
-
========================================================================== */
|
300
|
-
/**
|
301
|
-
* Base colors
|
302
|
-
*/
|
303
|
-
/**
|
304
|
-
* Backgrounds
|
305
|
-
*/
|
306
|
-
/**
|
307
|
-
* Borders
|
308
|
-
*/
|
309
|
-
/**
|
310
|
-
* Buttons
|
311
|
-
*/
|
312
|
-
/**
|
313
|
-
* Picker base
|
314
|
-
*/
|
315
|
-
/**
|
316
|
-
* Date picker options
|
317
|
-
*/
|
318
|
-
/**
|
319
|
-
* Theme configurations
|
320
|
-
*/
|
321
|
-
/* ==========================================================================
|
322
|
-
$MIXINS
|
323
|
-
========================================================================== */
|
324
|
-
/**
|
325
|
-
* Common picker item states
|
326
|
-
*/
|
327
|
-
/**
|
328
|
-
* Opacity
|
329
|
-
*/
|
330
|
-
/**
|
331
|
-
* Vendor prefixes
|
332
|
-
*/
|
@@ -1,42 +1,6 @@
|
|
1
1
|
/* ==========================================================================
|
2
2
|
$BASE-TIME-PICKER
|
3
3
|
========================================================================== */
|
4
|
-
/* ==========================================================================
|
5
|
-
$VARIABLES
|
6
|
-
========================================================================== */
|
7
|
-
/**
|
8
|
-
* Base colors
|
9
|
-
*/
|
10
|
-
/**
|
11
|
-
* Backgrounds
|
12
|
-
*/
|
13
|
-
/**
|
14
|
-
* Borders
|
15
|
-
*/
|
16
|
-
/**
|
17
|
-
* Buttons
|
18
|
-
*/
|
19
|
-
/**
|
20
|
-
* Picker base
|
21
|
-
*/
|
22
|
-
/**
|
23
|
-
* Date picker options
|
24
|
-
*/
|
25
|
-
/**
|
26
|
-
* Theme configurations
|
27
|
-
*/
|
28
|
-
/* ==========================================================================
|
29
|
-
$MIXINS
|
30
|
-
========================================================================== */
|
31
|
-
/**
|
32
|
-
* Common picker item states
|
33
|
-
*/
|
34
|
-
/**
|
35
|
-
* Opacity
|
36
|
-
*/
|
37
|
-
/**
|
38
|
-
* Vendor prefixes
|
39
|
-
*/
|
40
4
|
/**
|
41
5
|
* The list of times.
|
42
6
|
*/
|
@@ -87,7 +51,8 @@
|
|
87
51
|
}
|
88
52
|
/* Disabled time */
|
89
53
|
.picker__list-item--disabled,
|
90
|
-
.picker__list-item--disabled:hover
|
54
|
+
.picker__list-item--disabled:hover,
|
55
|
+
.picker--focused .picker__list-item--disabled {
|
91
56
|
background: #f5f5f5;
|
92
57
|
border-color: #f5f5f5;
|
93
58
|
color: #dddddd;
|
@@ -135,42 +100,6 @@
|
|
135
100
|
/* ==========================================================================
|
136
101
|
$CLASSIC-TIME-PICKER
|
137
102
|
========================================================================== */
|
138
|
-
/* ==========================================================================
|
139
|
-
$VARIABLES
|
140
|
-
========================================================================== */
|
141
|
-
/**
|
142
|
-
* Base colors
|
143
|
-
*/
|
144
|
-
/**
|
145
|
-
* Backgrounds
|
146
|
-
*/
|
147
|
-
/**
|
148
|
-
* Borders
|
149
|
-
*/
|
150
|
-
/**
|
151
|
-
* Buttons
|
152
|
-
*/
|
153
|
-
/**
|
154
|
-
* Picker base
|
155
|
-
*/
|
156
|
-
/**
|
157
|
-
* Date picker options
|
158
|
-
*/
|
159
|
-
/**
|
160
|
-
* Theme configurations
|
161
|
-
*/
|
162
|
-
/* ==========================================================================
|
163
|
-
$MIXINS
|
164
|
-
========================================================================== */
|
165
|
-
/**
|
166
|
-
* Common picker item states
|
167
|
-
*/
|
168
|
-
/**
|
169
|
-
* Opacity
|
170
|
-
*/
|
171
|
-
/**
|
172
|
-
* Vendor prefixes
|
173
|
-
*/
|
174
103
|
/**
|
175
104
|
* Note: the root picker element should __NOT__ be styled
|
176
105
|
* more than what’s here. Style the `.picker__holder` instead.
|
@@ -1,42 +1,6 @@
|
|
1
1
|
/* ==========================================================================
|
2
2
|
$BASE-PICKER
|
3
3
|
========================================================================== */
|
4
|
-
/* ==========================================================================
|
5
|
-
$VARIABLES
|
6
|
-
========================================================================== */
|
7
|
-
/**
|
8
|
-
* Base colors
|
9
|
-
*/
|
10
|
-
/**
|
11
|
-
* Backgrounds
|
12
|
-
*/
|
13
|
-
/**
|
14
|
-
* Borders
|
15
|
-
*/
|
16
|
-
/**
|
17
|
-
* Buttons
|
18
|
-
*/
|
19
|
-
/**
|
20
|
-
* Picker base
|
21
|
-
*/
|
22
|
-
/**
|
23
|
-
* Date picker options
|
24
|
-
*/
|
25
|
-
/**
|
26
|
-
* Theme configurations
|
27
|
-
*/
|
28
|
-
/* ==========================================================================
|
29
|
-
$MIXINS
|
30
|
-
========================================================================== */
|
31
|
-
/**
|
32
|
-
* Common picker item states
|
33
|
-
*/
|
34
|
-
/**
|
35
|
-
* Opacity
|
36
|
-
*/
|
37
|
-
/**
|
38
|
-
* Vendor prefixes
|
39
|
-
*/
|
40
4
|
/**
|
41
5
|
* Note: the root picker element should __NOT__ be styled
|
42
6
|
* more than what’s here. Style the `.picker__holder` instead.
|
@@ -72,43 +36,7 @@
|
|
72
36
|
|
73
37
|
/*!
|
74
38
|
* Default mobile-first, responsive styling for pickadate.js
|
75
|
-
* Demo: http://amsul.github.io/pickadate.js
|
76
|
-
*/
|
77
|
-
/* ==========================================================================
|
78
|
-
$VARIABLES
|
79
|
-
========================================================================== */
|
80
|
-
/**
|
81
|
-
* Base colors
|
82
|
-
*/
|
83
|
-
/**
|
84
|
-
* Backgrounds
|
85
|
-
*/
|
86
|
-
/**
|
87
|
-
* Borders
|
88
|
-
*/
|
89
|
-
/**
|
90
|
-
* Buttons
|
91
|
-
*/
|
92
|
-
/**
|
93
|
-
* Picker base
|
94
|
-
*/
|
95
|
-
/**
|
96
|
-
* Date picker options
|
97
|
-
*/
|
98
|
-
/**
|
99
|
-
* Theme configurations
|
100
|
-
*/
|
101
|
-
/* ==========================================================================
|
102
|
-
$MIXINS
|
103
|
-
========================================================================== */
|
104
|
-
/**
|
105
|
-
* Common picker item states
|
106
|
-
*/
|
107
|
-
/**
|
108
|
-
* Opacity
|
109
|
-
*/
|
110
|
-
/**
|
111
|
-
* Vendor prefixes
|
39
|
+
* Demo: http://amsul.github.io/pickadate.js
|
112
40
|
*/
|
113
41
|
/**
|
114
42
|
* Make the holder and frame fullscreen.
|
@@ -1,42 +1,6 @@
|
|
1
1
|
/* ==========================================================================
|
2
2
|
$BASE-DATE-PICKER
|
3
3
|
========================================================================== */
|
4
|
-
/* ==========================================================================
|
5
|
-
$VARIABLES
|
6
|
-
========================================================================== */
|
7
|
-
/**
|
8
|
-
* Base colors
|
9
|
-
*/
|
10
|
-
/**
|
11
|
-
* Backgrounds
|
12
|
-
*/
|
13
|
-
/**
|
14
|
-
* Borders
|
15
|
-
*/
|
16
|
-
/**
|
17
|
-
* Buttons
|
18
|
-
*/
|
19
|
-
/**
|
20
|
-
* Picker base
|
21
|
-
*/
|
22
|
-
/**
|
23
|
-
* Date picker options
|
24
|
-
*/
|
25
|
-
/**
|
26
|
-
* Theme configurations
|
27
|
-
*/
|
28
|
-
/* ==========================================================================
|
29
|
-
$MIXINS
|
30
|
-
========================================================================== */
|
31
|
-
/**
|
32
|
-
* Common picker item states
|
33
|
-
*/
|
34
|
-
/**
|
35
|
-
* Opacity
|
36
|
-
*/
|
37
|
-
/**
|
38
|
-
* Vendor prefixes
|
39
|
-
*/
|
40
4
|
/**
|
41
5
|
* The picker box.
|
42
6
|
*/
|
@@ -74,7 +38,7 @@
|
|
74
38
|
font-size: .8em;
|
75
39
|
border: 1px solid #b7b7b7;
|
76
40
|
height: 2.5em;
|
77
|
-
padding: .
|
41
|
+
padding: .5em .25em;
|
78
42
|
margin-left: .25em;
|
79
43
|
margin-right: .25em;
|
80
44
|
margin-top: -0.5em;
|
@@ -211,10 +175,6 @@
|
|
211
175
|
}
|
212
176
|
.picker__day--outfocus {
|
213
177
|
color: #dddddd;
|
214
|
-
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=66)";
|
215
|
-
filter: alpha(opacity=66);
|
216
|
-
-moz-opacity: 0.66;
|
217
|
-
opacity: 0.66;
|
218
178
|
}
|
219
179
|
.picker__day--infocus:hover,
|
220
180
|
.picker__day--outfocus:hover {
|
@@ -294,39 +254,3 @@
|
|
294
254
|
/* ==========================================================================
|
295
255
|
$DEFAULT-DATE-PICKER
|
296
256
|
========================================================================== */
|
297
|
-
/* ==========================================================================
|
298
|
-
$VARIABLES
|
299
|
-
========================================================================== */
|
300
|
-
/**
|
301
|
-
* Base colors
|
302
|
-
*/
|
303
|
-
/**
|
304
|
-
* Backgrounds
|
305
|
-
*/
|
306
|
-
/**
|
307
|
-
* Borders
|
308
|
-
*/
|
309
|
-
/**
|
310
|
-
* Buttons
|
311
|
-
*/
|
312
|
-
/**
|
313
|
-
* Picker base
|
314
|
-
*/
|
315
|
-
/**
|
316
|
-
* Date picker options
|
317
|
-
*/
|
318
|
-
/**
|
319
|
-
* Theme configurations
|
320
|
-
*/
|
321
|
-
/* ==========================================================================
|
322
|
-
$MIXINS
|
323
|
-
========================================================================== */
|
324
|
-
/**
|
325
|
-
* Common picker item states
|
326
|
-
*/
|
327
|
-
/**
|
328
|
-
* Opacity
|
329
|
-
*/
|
330
|
-
/**
|
331
|
-
* Vendor prefixes
|
332
|
-
*/
|
@@ -1,42 +1,6 @@
|
|
1
1
|
/* ==========================================================================
|
2
2
|
$BASE-TIME-PICKER
|
3
3
|
========================================================================== */
|
4
|
-
/* ==========================================================================
|
5
|
-
$VARIABLES
|
6
|
-
========================================================================== */
|
7
|
-
/**
|
8
|
-
* Base colors
|
9
|
-
*/
|
10
|
-
/**
|
11
|
-
* Backgrounds
|
12
|
-
*/
|
13
|
-
/**
|
14
|
-
* Borders
|
15
|
-
*/
|
16
|
-
/**
|
17
|
-
* Buttons
|
18
|
-
*/
|
19
|
-
/**
|
20
|
-
* Picker base
|
21
|
-
*/
|
22
|
-
/**
|
23
|
-
* Date picker options
|
24
|
-
*/
|
25
|
-
/**
|
26
|
-
* Theme configurations
|
27
|
-
*/
|
28
|
-
/* ==========================================================================
|
29
|
-
$MIXINS
|
30
|
-
========================================================================== */
|
31
|
-
/**
|
32
|
-
* Common picker item states
|
33
|
-
*/
|
34
|
-
/**
|
35
|
-
* Opacity
|
36
|
-
*/
|
37
|
-
/**
|
38
|
-
* Vendor prefixes
|
39
|
-
*/
|
40
4
|
/**
|
41
5
|
* The list of times.
|
42
6
|
*/
|
@@ -87,7 +51,8 @@
|
|
87
51
|
}
|
88
52
|
/* Disabled time */
|
89
53
|
.picker__list-item--disabled,
|
90
|
-
.picker__list-item--disabled:hover
|
54
|
+
.picker__list-item--disabled:hover,
|
55
|
+
.picker--focused .picker__list-item--disabled {
|
91
56
|
background: #f5f5f5;
|
92
57
|
border-color: #f5f5f5;
|
93
58
|
color: #dddddd;
|
@@ -135,42 +100,6 @@
|
|
135
100
|
/* ==========================================================================
|
136
101
|
$DEFAULT-TIME-PICKER
|
137
102
|
========================================================================== */
|
138
|
-
/* ==========================================================================
|
139
|
-
$VARIABLES
|
140
|
-
========================================================================== */
|
141
|
-
/**
|
142
|
-
* Base colors
|
143
|
-
*/
|
144
|
-
/**
|
145
|
-
* Backgrounds
|
146
|
-
*/
|
147
|
-
/**
|
148
|
-
* Borders
|
149
|
-
*/
|
150
|
-
/**
|
151
|
-
* Buttons
|
152
|
-
*/
|
153
|
-
/**
|
154
|
-
* Picker base
|
155
|
-
*/
|
156
|
-
/**
|
157
|
-
* Date picker options
|
158
|
-
*/
|
159
|
-
/**
|
160
|
-
* Theme configurations
|
161
|
-
*/
|
162
|
-
/* ==========================================================================
|
163
|
-
$MIXINS
|
164
|
-
========================================================================== */
|
165
|
-
/**
|
166
|
-
* Common picker item states
|
167
|
-
*/
|
168
|
-
/**
|
169
|
-
* Opacity
|
170
|
-
*/
|
171
|
-
/**
|
172
|
-
* Vendor prefixes
|
173
|
-
*/
|
174
103
|
/**
|
175
104
|
* The frame the bounds the time picker.
|
176
105
|
*/
|
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: 1.
|
4
|
+
version: 1.3.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: 2013-
|
11
|
+
date: 2013-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|