This project is read-only.
Project Description
DateEditEx inherit from DevExpress DateEdit. This control supports multi culture and right to left.


Introduction

Windows DateTimePicker doesn’t support calendar except Gregorian calendar; therefore a problem appears to display date time fields in multi language projects. My date picker solves this problem. This control named DateEditEx. DateEditEx inherit from DevExpress DateEdit. You can download their component suit from http://www.Devexpress.com. My uploaded setup contains all dependent reference.

Using the code

This product represents a Culture property to implement multi culture control, also you can set an instance of culture to thread for changing its functionality:
Thread.CurrentThread.CurrentCulture = new CultureInfo(“fa-Ir”);
//or
dateEditEx.Culture = new CultureInfo(“fa-Ir”);
And set a custom calendar to change functionality of it.
dateEditEx.RightToLeft = RightToLeft.Yes;
Thread.CurrentThread.CurrentCulture.DateTimeFormat.Calendar = new PersianCalendar();
//or
dateEditEx.Culture.DateTimeFormat.Calendar = new PersianCalendar();
1.JPG

for GregorianCalendar

dateEditEx.RightToLeft = RightToLeft.No;
Thread.CurrentThread.CurrentCulture.DateTimeFormat.Calendar = new GregorianCalendar();
//or
dateEditEx.Culture.DateTimeFormat.Calendar = new GregorianCalendar();
2.JPG

for HijriCalendar

dateEditEx.RightToLeft = RightToLeft.Yes;
Thread.CurrentThread.CurrentCulture.DateTimeFormat.Calendar = new HijriCalendar();	
//or
dateEditEx.Culture.DateTimeFormat.Calendar = new HijriCalendar();	
3.JPG

Points of Interest
For more information about set PersianCalendar to culture see
http://www.codeplex.com/persianculture
http://www.codeproject.com/PersianCalendar

Last edited Jul 9, 2009 at 5:57 PM by rezataroosheh, version 12