/// <summary> /// Summary description for dsTextBox. /// </summary> [ToolboxBitmap(typeof(DateTimePicker)), DefaultProperty("TextValue")] public class wwDateTimePicker : System.Windows.Forms.DateTimePicker, Westwind.Windows.IwwDataControl { protected System.Windows.Forms.TextBox textinput; public wwDateTimePicker() { this.Format = DateTimePickerFormat.Short; this.Width = 85; this.CalendarTitleBackColor = SystemColors.InactiveCaption; textinput = new TextBox(); textinput.Left = this.Left +2; //textinput.Height = this.Height - 4; textinput.Size= this.ClientSize; textinput.Width = textinput.Width - 20; textinput.Top = this.Top + 2; textinput.BackColor = SystemColors.ControlLightLight; textinput.BringToFront(); textinput.Visible = true; textinput.BorderStyle = System.Windows.Forms.BorderStyle.None; this.Controls.Add(textinput); // *** Force events to update this.ValueChanged += new EventHandler(wwDateTimePicker_ValueChanged); this.textinput.Validated +=new EventHandler(textinput_Validated); this.textinput.KeyPress +=new KeyPressEventHandler(textinput_KeyPress); } /// <summary> /// Text value that can be bound to for null and empty values. /// This value is set internally, but can also be externally accessed /// for these special situations. /// </summary> public string TextValue { get { try { if (this.Value < Convert.ToDateTime("01/01/1905") ) return ""; return this.Value.ToString("d"); } catch { return ""; } } set { if (value == "") { this.Value = Convert.ToDateTime("01/02/1900"); } else { try { this.Value = Convert.ToDateTime(value); } catch { this.Value = Convert.ToDateTime("01/02/1900"); } } } } protected void wwDateTimePicker_ValueChanged(object sender, EventArgs e) { try { if (this.Value < Convert.ToDateTime("01/01/1901") ) { this.textinput.Text = ""; return; } this.textinput.Text = this.Value.ToString("d"); } catch { this.textinput.Text = ""; } } /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void textinput_Validated(object sender, EventArgs e) { this.TextValue = this.textinput.Text; // force a refresh } }I also added a TextValue property which holds the value you see and can also edit.