Himanshu Gautam

Sunday, July 3, 2016

Set Date Format using TextBoxFor in mvc



Use this format "{0:MM/dd/yyyy}" in textboxfor html helper to MM/dd/yyyy format.


@Html.TextBoxFor(z => z.DOB,"{0:MM/dd/yyyy}", new { @class = "form-control datepicker", @id = "datetimepicker" })
Posted by Himanshu Gautam No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Pages

  • Home
  • Taj Mahal in C++
  • Binary Search Tree in C++

Blog Archive

  • ►  2022 (1)
    • ►  June (1)
  • ►  2020 (2)
    • ►  July (2)
  • ►  2018 (2)
    • ►  May (2)
  • ▼  2016 (3)
    • ▼  July (1)
      • Set Date Format using TextBoxFor in mvc
    • ►  April (2)
  • ►  2015 (1)
    • ►  February (1)
  • ►  2014 (37)
    • ►  May (22)
    • ►  April (15)
  • ►  2012 (6)
    • ►  October (3)
    • ►  August (3)

Facebook Badge

Himanshu Gautam

Create Your Badge

About Me

Himanshu Gautam
View my complete profile
Simple theme. Powered by Blogger.