I wrote following scr but my form field is still empty.
function callme(e) {
let today = new Date();
document.getElementById('dtCikisTarih').value = today;
}
My form field has a specific definition as
<asp:Button ID="btnAktar" runat="server" Text="Aktar" CommandName="AktarRow" class = "inp" OnClientClick="return callme(this)" />
<iskurDateTimeBoxes:IskurDateBox ID="dtGirisTarih" runat="server" clientidmode="static"/>
<iskurDateTimeBoxes:IskurDateBox ID="dtCikisTarih" runat="server" clientidmode="static"/>
2
Answers
This code solved the problem:
to set the date field in javascript
your code should be like this
issue with setting the date value directly as a Date object. You need to format the date as a string in the appropriate format that the input field expects