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


Leave a Reply

Please log in using one of these methods to post your comment: Logo

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

Google+ photo

You are commenting using your Google+ 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