jQuery(function($) {
$('.date-pick').each(function() {
var format = $(this).data('format') || 'mm/dd/yyyy';
format = format.replace(/yyyy/i, 'yy');
$(this).datepicker({
autoFocusNextInput: true,
constrainInput: false,
changeMonth: true,
changeYear: true,
beforeShow: function(input, inst) { $('#ui-datepicker-div').addClass('show'); },
dateFormat: format.toLowerCase(),
});
});
d = new Date();
$('.birthdate-pick').each(function() {
var format = $(this).data('format') || 'mm/dd';
format = format.replace(/yyyy/i, 'yy');
$(this).datepicker({
autoFocusNextInput: true,
constrainInput: false,
changeMonth: true,
changeYear: false,
minDate: new Date(d.getFullYear(), 1-1, 1),
maxDate: new Date(d.getFullYear(), 12-1, 31),
beforeShow: function(input, inst) { $('#ui-datepicker-div').removeClass('show'); },
dateFormat: format.toLowerCase(),
});
});
});
The Arden Personnel Blog
We'll help you bloom
A blog for employees and employers alike — signup up for the latest tips, and insight from the Warwickshire job scene…
Register Here
We will only send you relevent job related information and will never sell, rent or misuse your email. A clear unsubscribe link will be sent with every email.