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

Advertisement

0 Responses to “Forcing the NetTiers javascript calendar control to use UK dates”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Topics/ Categories

My (Live) Twitter stream

Archives

My Recent Bookmarks

 

January 2010
M T W T F S S
« Nov   Apr »
 123
45678910
11121314151617
18192021222324
25262728293031

Follow

Get every new post delivered to your Inbox.