vendor/assets/javascripts/bhf/application.js in bhf-0.4.4 vs vendor/assets/javascripts/bhf/application.js in bhf-0.4.5
- old
+ new
@@ -24,35 +24,21 @@
});
scope.getElements('.array_holder').each(function(elem){
new ArrayFields(elem);
});
- var dateFormat = Locale.get('Date.shortDate').replace(/%/g, '');
- var timeFormat = 'H:i'; // Locale.get('Date.shortTime').replace(/%/g, '')
- var dateMonths = Locale.get('Date.months');
- var dateDays = Locale.get('Date.days');
- new DatePicker(scope.getElements('.picker.datetime, .picker.timestamp'), {
- allowEmpty: true,
- inputOutputFormat: 'Y-m-d H:i',
- months: dateMonths,
- days: dateDays,
+ // TODO: i18n datepicker
+ new Picker.Date(scope.getElements('.picker.datetime, .picker.timestamp'), {
timePicker: true,
- format: dateFormat+' '+timeFormat
+ format: '%Y-%m-%d %H:%M'
});
- new DatePicker(scope.getElements('.picker.date'), {
- allowEmpty: true,
- inputOutputFormat: 'Y-m-d H:i',
- months: dateMonths,
- days: dateDays,
- format: dateFormat
+ new Picker.Date(scope.getElements('.picker.date'), {
+ timePicker: false,
+ format: '%Y-%m-%d'
});
- new DatePicker(scope.getElements('.picker.time'), {
- allowEmpty: true,
- inputOutputFormat: 'Y-m-d H:i',
- months: dateMonths,
- days: dateDays,
- timePickerOnly: true,
- format: timeFormat
+ new Picker.Date(scope.getElements('.picker.time'), {
+ pickOnly: 'time',
+ format: '%H:%M'
});
};
// TODO: disable more ajax calls while ajax is loading
var quickEdit = new AjaxEdit({
\ No newline at end of file