Click here to Skip to main content
15,884,537 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
@Html.TextBoxFor(m=>m.Date,new{@class="form-control", @type="date"})


and model class is

C#
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; }
      
    }
Posted
Updated 8-Jan-16 23:09pm
v2
Comments

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