jQuery: The Write Less, Do More JavaScript Library

Automatic Date Completion

Average rating
(3 votes)

For use in an <input type="text" /> field. It lets the user only type in 10 and the input will be transformed into 2007-12-10.

Only typing a number will get the month and year. It presumes it's in the future, so if you type 10 on the eleventh of November, it will return December (2007-12-10 that is).

Works great with the jQuery UI Datepicker

One way of use

$("input").blur(function () {
var value = $(this).val();

$(this).dateCompletion(value);
}
});

Releases

Official releasesDateSizeLinksStatus
0.9.12007-Nov-292.64 KBRecommended for 1.2.xThis is currently the recommended release for 1.2.x.