Posts Tagged 'date'

Forcing the NetTiers javascript calendar control to use UK dates

I’ve been using nettiers 2.3.0 with a new project that uses a lot of date fields.

I’ve had a problem with using the javascript calendar control that is produced with netTiers, in that it uses the American style date format mm/dd/yyyy. On DB set up for UK dates this causes a date conversion error.

At first I was hoping this could be ‘fixed’ by changing the culture info in the generated web.config file – to something like

However the nettiers js calendar control has no such built in globalisation logic.

It does however have a CalendarControl.js file where the string generated by the control is hard coded. So to make this generate UK style dates you simply need to change var dateString = month+”-”+day+”-”+year to var dateString = day+”-”+month+”-”+year


Topics/ Categories

My (Live) Twitter stream

Archives

My Recent Bookmarks

 

February 2012
M T W T F S S
« Oct    
 12345
6789101112
13141516171819
20212223242526
272829  

Follow

Get every new post delivered to your Inbox.