none
Date format for Ireland in Date Picker

    Question

  • Hi,

    The date format for Ireland is dd-mm-yyyy.  When I add a date picker to an infopath form and set the locale to English(Ireland) I do not get this format available to me in the list when designing the form.
    So even when I set the format of the dates to dd-mm-yyyy programmatically when the form is loading the date picker control shows an error because it does not recognise this format.
    The date picker is looking for a format of yyyy-mm-dd and will not accept any other format.

    Why is this formatting issue occurring?
    Thursday, August 20, 2009 4:31 PM

All replies

  • Hi,

    The date format for Ireland is dd-mm-yyyy.  When I add a date picker to an infopath form and set the locale to English(Ireland) I do not get this format available to me in the list when designing the form.
    So even when I set the format of the dates to dd-mm-yyyy programmatically when the form is loading the date picker control shows an error because it does not recognise this format.
    The date picker is looking for a format of yyyy-mm-dd and will not accept any other format.

    Why is this formatting issue occurring?
    While the date format might not be available when designing the form template, it can be set "behind the scenes" using either a date format specified by the operating system or the form language. For example, if you choose the short date format that has an asterisk (*) in front of it (Date Picker Properties) and then change the short date format of your operating system (Start > Settings > Control Panel > Regional and Language Options) and you then fill out the form using the InfoPath client application, the date format you specified in the regional settings will be used by InfoPath. This behavior differs for browser forms. The documentation says that the date format depends on the form language (Tools > Form Options > Browser > Form language) you select for the form template. So if you're using a browser-compatible form template, you could try setting the form language to English (Ireland) and see whether that helps. Please note that the form language works in conjunction with the language packs you've got installed on the SharePoint server.

    As far as I know, you cannot programmatically set the date format InfoPath displays to the user, and you can only use specific date formats to programmatically set the value of a date in InfoPath.

    S.Y.M. Wong-A-Ton, owner of the InfoPath Solutions Blog, and author of 100+ InfoPath articles and 40+ InfoPath - SharePoint integration articles
    Sunday, August 23, 2009 7:42 AM
  • Thanks for your reply SYM Wong-A-Ton.

    The language is already set to English (Ireland).  The regional settings of the site are also set correctly for Ireland.  The date picker control still shows the American date format.

    This doesn't make sense that I cannot show an Irish date format to users within the date picker control.  There must be some way to do it.
    Monday, August 24, 2009 12:10 PM