Click here to Skip to main content
15,664,823 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have added jquery datepicker to textbox, datepicker display the selected date into textbox but the date value does not bind to actual value property of the input text.
hence selected date value can not get into controller after form submit

i am using following way to use textbox

@Html.TextBoxFor(m=>m.Date,new{@class="form-control", @type="date"})

and model class is

public partial class SpecialDay
        public int ID { get; set; }
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString ={0:dd/MM/yyyy};)]
        public System.DateTime Date { get; set; }
        public string StartTime { get; set; }
        public string EndTime { get; set; }
Updated 8-Jan-16 23:09pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900