can't you just use calendar's attribute datePattern?
Thanks for your comment.
However, the datePattern does not really restrict you from entering dates in the wrong format which when saved produces different results. For example, if my desired format is MM/dd/yyyy, the datePattern will still allow me to manually input date like 1/1/10 which when saved is stored as 12/31/0009 instead of 01/01/2010. I want to have the flexibility of either manually entering dates or picking dates from the calendar.
I've had problems with nesting anything inside rich:calendar, so take rich:jQuery out and place it below rich:calenar.
See if it is generated in page html source.
thanks for the suggestion.
it also generated the script just like my original code but nothing happens. i will investigate further.