Does anyone know how to pass html attributes like “data-date” to the Html.TextBox()??
It is used from the bootstrap datepicker.
Is there a way around it?
@Html.TextBoxFor(p => p.DateFrom, new { @class = "small", type = "date", "data-date"="12-02-2012" })
You have to use underscore instead of ‘-‘.
So what you’re after would go something like this: