2014-10-08

For some reason, my calendar control/date picker works on the development server but not on the production server when my date display format is ISO (YYYY-MM-DD). It keeps displaying the American date format which isn't what I want.

I have tried all possible solutions online to no avail.

I notice that when I signout in the dev environment, I see query string with culture as en-GB. In the production environment, I see en-US which is strange.

I read this here:
http://www.ironspeed.com/Designer/11.0.1/WebHelp/Part_II/Localizing_Internationalizing_Your_Application.htm

Quote:

Culture Encoding

The culture encoding attributes in your Web.config file determine many aspects of your .NET application, including currency, date, and number format.  Your application uses these settings at run-time to determine proper operation.  Since these culture encoding attributes are used by the .NET Framework, Iron Speed Designer does not use them directly.  However, a discussion of them is included here due to their importance in localizing your application.

Seems like ISD uses other .Net settings...

My solution is to go with the jQuery UI Date picker instead. http://jqueryui.com/datepicker/

- Deactivate calender control. Tools -> Application Generation Option... -> General Application Options -> Web Page Options -> Page Controls -> Add calendar control for date fields -> None
- Add the jQuery UI script to HorizontalMenu.master (or the appropriate master page you use)
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
- Add the jQuery UI css (http://jqueryui.com/themeroller/) in the Page_InitializeEventHandlers method  in Header.ascx.cs

Code:

- Make sure all input fields to be affected end with the name "Date"
- Create a JS file in your application root and paste this function

Code:

- Finally add the JS file script reference to your master page. E.g
<script src="../GlobaljQueryFunctions.js"></script>

It works like magic on all pages with a date field, be it add or edit...

Furthermore you can use the jQuery UI style that suits your taste

Forum: Using Iron Speed Designer V10.X

Show more