嗨,我想在文本框中显示从我的 datetimepicker 中选择的日期。我尝试了以下方法,但在值上出现错误: DatePicker does not contain a definition for 'Value' accept the first argument of type '' can not be found..
private void datePicker_ValueChanged(object sender, EventArgs e)
{
DateTime date = this.datePicker.Value;
this.txtExpire.Text = date.ToString("dd-mm-yyyy");
}