简体   繁体   中英

JQuery datepicker not sending selected value by posting in my asp.Net core application

Please forgive me if I am asking a previously asked question. But I get stacked in this problem. Please help me.

I am using jQuery datepicker in my project. I can see the datepicker in browser well. But when I am posting only the selected value of datepicker not going to my PostAction where all other values are working properly. Timepicker also sending selected value Please help me to get rid of this problem.

Thanks in advance.

This is my browser view

Script section

Form fields

Js and CSS file

Model Properties

Here is the posted value from browser

The date format of System.Datetime was dd-mm-yy . But the date format of datepicker is mm-dd-yy . When I was selecting date from datepicker it was selecting a wrong value where format was not getting matched with the format of model property.

That's why I was facing this problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM