0

how do you change the default placeholder of the datepicker class in bootstrap?

This is my current code and has the place holder of yyyy-mm-dd but I want to change it to something different like "Enter date"

@Html.TextBoxFor(m=> m.test, "{0:yy-MM-dd}", new { @class = "datepicker form-control" })

I tried

@Html.TextBoxFor(m=> m.test, "{0:yy-MM-dd}", new { @class = "datepicker form-control", placeholder = "Enter text" })

but that does not do the trick.

Any suggestions?

Herofire
  • 71
  • 7
  • Possible duplicate of [How to add placeholder field?](https://stackoverflow.com/questions/30048323/how-to-add-placeholder-input-type-datetime-local-field) – S. Walker Mar 05 '18 at 14:45
  • 1
    This is a duplicate of https://stackoverflow.com/questions/30048323/how-to-add-placeholder-input-type-datetime-local-field because the user is asking "How to add placeholder to datetime-local field" `@Html.TextBoxFor(m=> [DateTimeField])` generates a textbox with datetime-local. – S. Walker Mar 05 '18 at 14:46
  • Which date picker component/plugin are you using? – Luis Serrano Mar 05 '18 at 14:47

0 Answers0