$(function() { $('.timepicker').each(function(i,obj) { $(obj).datetimepicker({ hour: 8, stepMinute: 15, timeFormat: 'hh:mm tt', dateFormat: 'mm-dd-yy', // timezoneList: { label: 'foobar', value: -700 }, // parse: 'loose', // unnecessary risk ( m/d vs d/m and 'loose' process before 'strict' altField: $(obj).data('altfield'), altFieldTimeOnly: false, altFormat: 'mm/dd/yy', altTimeFormat: "hh:mm tt" }); });
$('.timepickerPrecise').each(function(i,obj) { $(obj).datetimepicker({ hour: 8, stepMinute: 1, timeFormat: 'hh:mm tt', dateFormat: 'mm-dd-yy', altField: $(obj).data('altfield'), altFieldTimeOnly: false, altFormat: 'mm/dd/yy', altTimeFormat: "hh:mm tt" }); });
$('.datepicker').each(function(i,obj) { $(obj).datepicker({ dateFormat: 'mm-dd-yy', altField: $(obj).data('altfield'), altFormat: 'yy/mm/dd' }); });
$('.datetimepicker-standard').each(function(i,obj) { $(obj).datetimepicker({ hour: 8, stepMinute: 15, timeFormat: 'hh:mm tt', dateFormat: 'mm-dd-yy', altField: $(obj).data('altfield'), altFieldTimeOnly: false, altFormat: 'yy/mm/dd', altTimeFormat: "hh:mm tt" }); }); });