This code will help you to understand why DateTime 24-hours conversion to AM/PM is not working.
You have to use the format-value string “yyyy-MM-ddTHH:mm” to work with AM/PM conversion properly.
<input type="datetime-local" id="Test" name="Test" class="form-control" @bind="@testDateTime" format-value="yyyy-MM-ddTHH:mm" /> @code { DateTime testDateTime { get; set; } = new DateTime(2019, 12, 15, 16, 45, 15); }
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
You have to use the format-value string “yyyy-MM-ddTHH:mm” to work with AM/PM conversion properly.
need an explanation for this answer? contact us directly to get an explanation for this answer