will_pickdate 0.9.4 → 0.9.5

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.
@@ -422,7 +422,7 @@
422
422
  v = (v < 23) ? v + 1 : 0;
423
423
  }
424
424
  else if(dy < 0) {
425
- v = (v > 0) ? v - 1 : 23;
425
+ v = (v > 0) ? Math.min(v - 1, 23) : 23;
426
426
  }
427
427
  }
428
428
  else {
@@ -445,7 +445,7 @@
445
445
  ampm.val(ampm.val() == 'AM' ? 'PM' : 'AM');
446
446
  }
447
447
  else if(v > 1) {
448
- v--;
448
+ v = Math.min(v - 1, 12);
449
449
  }
450
450
  else {
451
451
  v = 12;
@@ -494,8 +494,9 @@
494
494
  dy = -1;
495
495
  } else if (48 <= event.which && event.which <= 57) {
496
496
  event.target.value = (event.target.value + String.fromCharCode(event.which)).substr(1,2)
497
- } else if (event.which == 9 ) {
497
+ } else if (event.which == 9 || event.which == 46 || event.which == 8) {
498
498
  //allow tab to skip to next
499
+ //allow delete and backspace to have normal behaviour
499
500
  return;
500
501
  }
501
502
  $.proxy(f, this)(event, null, null, dy);
@@ -1,3 +1,3 @@
1
1
  module WillPickdate
2
- VERSION = "0.9.4"
2
+ VERSION = "0.9.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: will_pickdate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-11 00:00:00.000000000 Z
12
+ date: 2013-05-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake