Use fomantic calendar

This commit is contained in:
2019-10-18 16:08:57 -05:00
parent 310a0e1187
commit e75846282e
2 changed files with 15 additions and 11 deletions
@@ -7,6 +7,7 @@
* http://opensource.org/licenses/MIT
*/
debugger;
;
(function ($, window, document, undefined) {
@@ -1,6 +1,7 @@
#= require ./calendar-vendor
# require ./calendar-vendor
Dunlop.register_setup 'calendar', (target) ->
target.find('.datepicker').calendar
target.find('.datepicker').each ->
options =
firstDayOfWeek: 1
type: 'date'
formatter:
@@ -10,6 +11,8 @@ Dunlop.register_setup 'calendar', (target) ->
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