|
@@ -13,7 +13,7 @@ namespace Terminal.Gui;
|
|
|
public class DatePicker : View
|
|
|
{
|
|
|
private TableView _calendar;
|
|
|
- private DateTime _date = DateTime.MinValue;
|
|
|
+ private DateTime _date;
|
|
|
private DateField _dateField;
|
|
|
private Label _dateLabel;
|
|
|
private Button _nextMonthButton;
|
|
@@ -21,7 +21,7 @@ public class DatePicker : View
|
|
|
private DataTable _table;
|
|
|
|
|
|
/// <summary>Initializes a new instance of <see cref="DatePicker"/>.</summary>
|
|
|
- public DatePicker () { SetInitialProperties (_date); }
|
|
|
+ public DatePicker () { SetInitialProperties (DateTime.Now); }
|
|
|
|
|
|
/// <summary>Initializes a new instance of <see cref="DatePicker"/> with the specified date.</summary>
|
|
|
public DatePicker (DateTime date) { SetInitialProperties (date); }
|
|
@@ -183,6 +183,7 @@ public class DatePicker : View
|
|
|
|
|
|
private void SetInitialProperties (DateTime date)
|
|
|
{
|
|
|
+ _date = date;
|
|
|
Title = "Date Picker";
|
|
|
BorderStyle = LineStyle.Single;
|
|
|
Date = date;
|