Here is my code :
In My MVC View:
@
{
var datefrom = Model.Vehicle.First().DateFrom.ToString("MMMM yyyy")
};
In my AjaxBeginForm:
{
<input type="hidden" id="vehicledatefrom" value=@datefrom/>
}
My jquery:
var datefromto= $('#vehicledatefrom').val() ;
After debugging with break point, the datefrom value is = " July 2006";
But when I am calling the val() in jquery I am getting only "July".
What's the wrong in my code why I am not getting complete value "July 2006";
val() is not taking after the space why any suggestions thanks