Set the first day of week

How can I change the first day of week displayed by the DateTimePicker (DateTimeEdit) control in WPF? Always displays days from Sunday. Is there any way to set the first day to Monday?

3 Replies 1 reply marked as answer

VR Vijayalakshmi Roopkumar Syncfusion Team September 8, 2020 09:42 AM UTC

Hi Daniel 
 
Thank you for your update. 
 
We have checked the reported requirement that you want to change the first day of week. You can achieve it by assigning the FirstDayOfWeek using the following code. 
 
 
Code:[C#] 
 
 
public MainWindow() 
{ 
InitializeComponent(); 
CultureInfo cultureInfo = new CultureInfo("en-US"); 
//Assign the desired firstdayofweek 
cultureInfo.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Friday; 
this._DateTimeEdit.CultureInfo = cultureInfo; 
} 
 
 
 
 
 
 
 
 
 
Please try this solution and let us know if it is helpful. 
 
Regards, 
Vijayalakshmi VR 


Marked as answer

DP Daniel Pérez September 8, 2020 02:58 PM UTC

Yes! it worked very well. Problem solved.

Thank you very much.

Regards.

Daniel P.


VR Vijayalakshmi Roopkumar Syncfusion Team September 9, 2020 04:48 AM UTC

Hi Daniel 
 
Thank you for your update. 
 
We are glad that our solution has helped to achieve your requirement.  
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Vijayalakshmi VR 


Loader.
Up arrow icon