[jQuery] How to get a 'fresh' ui datepicker date?

[jQuery] How to get a 'fresh' ui datepicker date?


Dear all,
This is about the ui datepicker.
I have an input field with a datepicker, using image as trigger.
The field is not read only, user are allowed to input by keyboard.
The problem is that when user type some invalid input like '333333'
the $('#input').datepicker('getdate'), will still only get the last
selected date.
Is that any way to get the 'fresh' date?
Any trigger I can call?
I need it to fill in a date range using 'beforeShow' option.