Sha256: 595de8a6ed028b1e09dfb58eab337c84635defbe393849615bb32babb8944ac4

Contents?: true

Size: 531 Bytes

Versions: 8

Compression:

Stored size: 531 Bytes

Contents

# Doc : http://bootstrap-datepicker.readthedocs.io/en/stable/index.html

window.setupDatepickers = ->
  $("input[type*=date], input[name*=date], input[name$=_at]").map ->
    return if this.type == "hidden"

    this.type = "text"

    # 2015-06-12 to 15/06/2015
    if this.value.match("-")
      this.value = this.value.split("-").reverse().join("/")

    $(this).datepicker
      language: "fr"
      format: "dd/mm/yyyy"
      todayBtn: "linked"
      autoclose: true

$(document).on "ready page:load", ->
  setupDatepickers()

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dorsale-2.7.3 app/assets/javascripts/dorsale/datepicker.coffee
dorsale-2.7.2 app/assets/javascripts/dorsale/datepicker.coffee
dorsale-2.7.1 app/assets/javascripts/dorsale/datepicker.coffee
dorsale-2.7.0 app/assets/javascripts/dorsale/datepicker.coffee
dorsale-2.6.8 app/assets/javascripts/dorsale/datepicker.coffee
dorsale-2.6.7 app/assets/javascripts/dorsale/datepicker.coffee
dorsale-2.6.6 app/assets/javascripts/dorsale/datepicker.coffee
dorsale-2.6.5 app/assets/javascripts/dorsale/datepicker.coffee