Bugfix: don't overwrite with new init

This commit is contained in:
Rick Falkvinge
2021-07-08 14:49:02 +02:00
parent 9903f8345e
commit 996fe86b90
+6 -1
View File
@@ -17,12 +17,17 @@ namespace Swarmops.Frontend.Controls.Base
protected void Page_Load (object sender, EventArgs e)
{
this.TextInput.Attributes["role"] = "note"; // disable Lastpass trying to autofill
this.InterpretedDate.Value = DateTime.Today.ToString(CultureInfo.InvariantCulture); // initialize to valid value
if (this.Layout == LayoutDirection.Unknown)
{
this.Layout = LayoutDirection.Vertical;
}
if (!Page.IsPostBack)
{
this.InterpretedDate.Value = DateTime.Today.ToString(CultureInfo.InvariantCulture);
// initialize to valid value
}
}
public DateTime Value