ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
how to set html id attribute for Datepicker
Title:
B
I
{code}
?
How can I set the html id attribute to use as a search parameter in Grid. @(Html.Awe().DatePickerFor(model => model.CreatedOnUtc).HtmlAttributes(new { id = "drvDate" }).Value(DateTime.Now).ChangeYear().ChangeMonth())
Save Changes
Cancel
Aleksandar
asked at 19 Oct 2021
if you don't set the attributes the id will be `CreatedOnUtc`, you can also make use of the strongly typed Grid `Parent` extension, to set html attributes for the input that holds the value use `HtmlAttributes(null, new { id = "drvDate" })`
at 19 Oct 2021
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK