DatePicker calendar start with Sunday

2 posts, 0 answers
  1. Nick Jacka
    Nick Jacka avatar
    4 posts
    Member since:
    Jan 2010

    Posted 16 Feb 2012 Link to this post

    Hi there,

    Has anyone worked out how to make the days in the calendar of the DatePicker start with a Sunday instead of a Monday?

    Regards,
    Nick
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Feb 2012 Link to this post

    Hello Nick,

    Try the following code.
    C#:
    public MainPage()
    {
     InitializeComponent();
     CultureInfo cultureInfo = new CultureInfo("en-US");
     DateTimeFormatInfo dateInfo = new DateTimeFormatInfo();
     dateInfo.FirstDayOfWeek = DayOfWeek.Sunday;
     cultureInfo.DateTimeFormat = dateInfo;
     this.pkr.Culture = cultureInfo;
    }

    -Shinu.
  3. DevCraft banner
Back to Top