diff --git a/app/assets/javascripts/dunlop-semantic/calendar-vendor.js b/app/assets/javascripts/dunlop-semantic/calendar-vendor.js index e6e8500..3d8d263 100644 --- a/app/assets/javascripts/dunlop-semantic/calendar-vendor.js +++ b/app/assets/javascripts/dunlop-semantic/calendar-vendor.js @@ -7,6 +7,7 @@ * http://opensource.org/licenses/MIT */ +debugger; ; (function ($, window, document, undefined) { diff --git a/app/assets/javascripts/dunlop-semantic/calendar.coffee b/app/assets/javascripts/dunlop-semantic/calendar.coffee index c52a971..4b7b49b 100644 --- a/app/assets/javascripts/dunlop-semantic/calendar.coffee +++ b/app/assets/javascripts/dunlop-semantic/calendar.coffee @@ -1,15 +1,18 @@ -#= require ./calendar-vendor +# require ./calendar-vendor Dunlop.register_setup 'calendar', (target) -> - target.find('.datepicker').calendar - firstDayOfWeek: 1 - type: 'date' - formatter: - date: (date, settings) -> - return '' unless date - moment(date).format().substr(0, 10) - datetime: (date, settings) -> - return '' unless date - moment(date).format().substr(0, 10) + target.find('.datepicker').each -> + options = + firstDayOfWeek: 1 + type: 'date' + formatter: + date: (date, settings) -> + return '' unless date + moment(date).format().substr(0, 10) + datetime: (date, settings) -> + return '' unless date + moment(date).format().substr(0, 10) + options.showWeekNumbers = true if $(@).data().hasOwnProperty('showWeekNumbers') + $(@).calendar options target.find('.timepicker').calendar ampm: false