Sha256: 6fb0c63197b3ac055db98585296ef208208062c2d03bb40e307f1534c861c24e

Contents?: true

Size: 682 Bytes

Versions: 1

Compression:

Stored size: 682 Bytes

Contents

$.fn.inputTimePicker = function () {
  'use strict';

  $(this).flatpickr({
    enableTime: true,
    noCalendar: true,
    dateFormat: 'h:i K'
  });
};

$.fn.inputDatePicker = function () {
  'use strict';

  $(this).flatpickr({
    dateFormat: 'Y-m-d',
    altInput: true,
    altFormat: 'F j, Y'
  });
};

$.fn.inputDateTimePicker = function () {
  'use strict';

  $(this).flatpickr({
    enableTime: true,
    dateFormat: 'Y-m-d H:i',
    altInput: true,
    altFormat: 'F j, Y @ h:i K'
  });
};

$(function() {
  'use strict';

  $('input.time_picker').inputTimePicker();

  $('input.date_picker').inputDatePicker();

  $('input.date_time_picker').inputDateTimePicker();

});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
archangel-0.4.0 app/assets/javascripts/archangel/input/datetimepicker.js