Datepicker bug?

Datepicker bug?

When using the jQuery UI 1.7.2 datepicker I can't get the syntax shown in the documentation to work:
$("#FromDate").datepicker({maxDate: selectedDate});
or
$("#ToDate").datepicker({ beforeShow: function(dateText, inst) { ...

However when I use the following syntax it works like a charm:
$("#FromDate").datepicker("option", "maxDate", selectedDate);
or
$("#ToDate").datepicker("option", { beforeShow: function(dateText, inst) { ...

Anyone else having these problems?