Posts Tagged 'javascript'

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

Lots of things Javascript

JAVASCRIPT TOOLBOX: 25+ Tools & Tutorials For JavaScript


Topics/ Categories

My (Live) Twitter stream

Archives

My Recent Bookmarks

 

May 2012
M T W T F S S
« Mar    
 123456
78910111213
14151617181920
21222324252627
28293031  

Follow

Get every new post delivered to your Inbox.