Date DropDownLists RRS feed

  • Question

  • User1729454657 posted

    Hi everyone,

    I was looking at the Facebook homepage and noticed that for the English (UK) page the birthday inputs have a dropdownlist for day first, followed be a dropdownlist for month and finally a dropdownlist for year.

    When you change the page to English (US) [near the bottom of the page], the inputs change order to the US format, i.e. month dropdownlist first, followed by the day and then the year.

    My application already takes into account Culture settings ( for instance, when DateTime.ToString() is called- it spits out the date in the correct format). How do I get DropDownLists into the correct order depending on culture a la Facebook?

    Thanks in advance,

    Tuesday, November 17, 2009 11:37 AM


All replies

  • User-1951871399 posted

    There's not just only one way to do this, but i would say that you could create a UserControl for your "date picker" and have this user control to display the dropdowns in the correct order according to the current ui culture.

    Tuesday, November 17, 2009 12:42 PM
  • User1413929471 posted

    You can use Eworld Datepicker control with culture info  http://www.eworldui.net/

    Wednesday, November 18, 2009 1:12 AM
  • User1729454657 posted

    Thanks for your replies,

    Thanks for the idea but I already use jQuery's datepicker which I find very useful.
    Having looked around at other 'big' sites, Facebook and Bebo, etc, they all seem to use dropdownlists for month, day and year.
    I was hoping to move away from attaching a datepicker on a textbox solution as validating that is harder. Giving a user a dropdownlist to choose a month, then one for a day, etc means the user can't screw up!

    I understand the concept of what you are saying but I am having trouble figuring out how to implement it.
    How would I switch the order of controls on a UserControl depending on Culture? The only way I can think of doing it is to dynamically create the controls in the code behind and place them in the correct order. It sounds a bit messy. Am I on the right track or have you any other ideas?

    Thanks again!

    Wednesday, November 18, 2009 5:28 AM
  • User1577733570 posted


    One possible solution could be change the position of drop down box at run time according to culture selected.

    Following link may help to implements the same. 

    Wednesday, November 18, 2009 11:41 PM
  • User1577733570 posted

    Sorry forgot to paste the link :)

    Here it is-



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 18, 2009 11:48 PM
  • User1729454657 posted

    Thanks All,

    Some good replies.


    Thursday, November 19, 2009 4:46 AM