I use this with maskedtextbox for datetime type
this.txtDateBrth.DataBindings.Add("Text", bsAgent, "DateBrth", true, DataSourceUpdateMode.OnPropertyChanged, null, "dd/MM/yyyy");
if necessary, null the date value, use the null-datetime type in the class declaration:
private DateTime? _DateBrth; public DateTime? DateBrth { get { return _DateBrth; } set { _DateBrth = value; } }
AZOUZ24
source share