validation using datepicker maxdate

validation using datepicker maxdate


hello people, i'm quite new to jquery, i did a lot of RTFM, still i
wasn't able to figure out if it's possible to make a validation rule
(using Jörn Zaefferer validation plugin) on a date field using the
boundaries provided by the minDate and maxDate options used by jquery
UI datepicker.
what makes me want this, is that even if the calendar can only be
clicked on the valid dates, a user could still enter a date manually
out the range, and won't get any validation error.
i thought about writing a custom validaiton rule, but my main concern
is to be able to get the values for those two params.
reading on the official documentation, i found this:
var maxd= $('.selector').datepicker('option', 'maxDate');
i was hoping the var would be a date, but instead i get a
HTMLInputElement
(looks like i'm missing something, but it does seem to return just the
same as $('.selector').val())
thanks in advance for the help.