diff options
| author | Robert | 2017-06-27 17:05:51 +0200 |
|---|---|---|
| committer | Robert | 2017-06-27 17:05:51 +0200 |
| commit | 0a147aec1d594884478e9d7006941e7ab5167bec (patch) | |
| tree | 655c30ab8e38151df93bfa7365ebbb1c2f04cb52 /app/assets/javascripts | |
| parent | b6f8729454b94c099332c972ff7e7992006b7483 (diff) | |
| download | chouette-core-0a147aec1d594884478e9d7006941e7ab5167bec.tar.bz2 | |
Refs: #3595@1h debugging smart_date.coffee
Diffstat (limited to 'app/assets/javascripts')
| -rw-r--r-- | app/assets/javascripts/smart_date.coffee | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/smart_date.coffee b/app/assets/javascripts/smart_date.coffee index 1698bee06..901b7a545 100644 --- a/app/assets/javascripts/smart_date.coffee +++ b/app/assets/javascripts/smart_date.coffee @@ -1,4 +1,7 @@ -legalDaysPerMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] + +smartDateSelector = '.smart_date' +smartDateSelectSelector = "#{smartDateSelector} select" +legalDaysPerMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] correctDay = (dateValues) -> [day, month, year] = dates @@ -8,7 +11,9 @@ correctDay = (dateValues) -> smartCorrectDate = -> allSelectors = $(@).parent().children('select') # N'a pas un sibbling('select', include_self = true) ? - allVals = allSelectors.map (sel) -> paeseInt(sel.val()) + console.log allSelectors + allVals = allSelectors.map (sel) -> parseInt($(sel).val()) + console.log allVals correctedDay = correctDay allVals daySelector = allSelectors.first() $(daySelector).val(correctedDay) |
