import moment from 'moment';
import $ from 'jquery';

$.datepicker.setDefaults({
  selectOtherMonths: true
});

// Set jQuery datepicker format to use Moment.js for consistency
// http://stackoverflow.com/a/24500727
$.datepicker.parseDate = (format, value) => {
  return moment(value, format).toDate();
};

$.datepicker.formatDate = (format, value) => {
  return moment(value).format(format);
};
