Sha256: c8547ffbd385c405ed8d4d11bcce4dbfa8e3dca3e569a74e119b27374362307b

Contents?: true

Size: 533 Bytes

Versions: 3

Compression:

Stored size: 533 Bytes

Contents

var create_datepickers = function(){

  $('input.datepicker').datepicker({format: 'yyyy-mm-dd'}).on('changeDate', function() {
    $(this).data('datepicker').hide();
  });

  // $('input.datetimepicker').datepicker({format: "yyyy-mm-dd HH:mm pp", pick12HourFormat: true}).on('changeDate', function() {
  //   $(this).data('datepicker').hide();
  // });
}


$(document).on("ready pjax:end", function () {
  create_datepickers();

  $(document).on('cocoon:after-insert', function(e, insertedItem) {
    create_datepickers();
  });
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cardboard_cms-0.1.8 app/assets/javascripts/cardboard/datepicker.js
cardboard_cms-0.1.6 app/assets/javascripts/cardboard/datepicker.js
cardboard_cms-0.1.4 app/assets/javascripts/cardboard/datepicker.js