<ej-grid id="FlatGrid" allow-paging="true" allow-filtering="true" action-complete="onComplete">
. . .
</ej-grid>
<script type="text/javascript">
function onComplete(args) {
if (args.requestType == "beginedit" || args.requestType == "add") {
$("#Date_Start").ejDatePicker({ width: "100%", value: args.data.Date_Start });
}
}
</script>
<script type="text/template" id="templateCourse">
<td>Date Start</td>
<td style="text-align: left">
<input id="Date_Start" name="Date_Start" type="text" />
</td>
</tr>
</script> |
Hi Mohammed,Thanks for contacting Syncfusion’s support.We have analyzed your requirement and we have already discussed this query in the following user guide documentation link.And we have modified your provided code to render the ejDatePicker control on the Dialog template form that can be refer from the below code example.
<ej-grid id="FlatGrid" allow-paging="true" allow-filtering="true" action-complete="onComplete">. . .</ej-grid><script type="text/javascript">function onComplete(args) {if (args.requestType == "beginedit" || args.requestType == "add") {$("#Date_Start").ejDatePicker({ width: "100%", value: args.data.Date_Start });}}</script><script type="text/template" id="templateCourse"><td>Date Start</td><td style="text-align: left"><input id="Date_Start" name="Date_Start" type="text" /></td></tr></script>Regards,Saravanan A.
Thanks. That worked for me. However, when i pick a date on the widget, it will save different date.
For example, I pick 6 September, then saved value is 7 September.
Thanks
Hi Muhammad,The date-time request on the controller is depend on the server time zone. Please refer to the following link to know more details.If the client and server has different timezone, the Grid content will show the date based on the client timezone. So, we suggest you to store date-time in common timezone (GMT/UTC) on the database or convert the date to UTC date format and return to the client.Regards,Saravanan A.
Thank you. This solution worked for me.