Bilingual Calendar

Hi All,

I am facing problem while accepting date if my language is other then English.
Let my language is French and below is my code to show the calendar.

dhtmlxcalendar code

    calendarObj = new dhtmlXCalendarObject(id);
dhtmlXCalendarObject.prototype.langData["language"] = {
	    monthesFNames: [...],
	                    
	    monthesSNames: [...],
	                    
	    daysFNames: [...],
	                 
	    daysSNames: [...]
}
calendarObj.loadUserLanguage('language');
    calendarObj.setDateFormat('%M %d, %Y');
calendarObj.show();	
event.cancelBubble=true;

====================

The calendar is working fine.
when i am accepting a date then it is coming in french language.

Example:

If click on August 18, 2011 then it is coming " Août 18, 2011 ".
When i am trying to save the data. It shows me database error.
because i am trying to save " Août 18, 2011 " in the date field.
we should convert the date to " 2011-08-18 00:00:00.0 " before updating in database.

So how i will convert the date into oracle understandable format.

Thanks & Regards,
Abhi

getDate() return the Date object. You may convert it into the string with the necessary format using getFormatedDate:

var date = calendar.getDate();

var str = calendar.getFormatedDate("%Y-%m-%d %H:%i:%s",date);

or just one parameter in the getFormatedDate (the active date is default):

var str = calendar.getFormatedDate("%Y-%m-%d %H:%i:%s");