i have a submit form where has a input field for group name. I want to create a group name and stote in the database. when the group name create thats time i want to pick the current date and store in the model class propert. please give me suggestion. Advance thank you.
<input type="hidden" asp-for="DateTime.Date" class="form-control" />
<input asp-for="Name" type="text" class="form-control" id="inputName"
placeholder="Group name">
<script>
$(function () {
//Date picker
$('#reservationdate').datetimepicker({
format: 'L',
format: 'dd/mm/yyyy'
});
}
</script>
model property
public DateTime DateTime { get; set; }
public string Name { get; set; }