javascript - Two dates combination showing as shortdate in textbox in mvc -
i have partial view has value of startdate -enddate.
i have startdate , enddate properties in model datetime. when data coming webapi binding time. need 01/01/2015 - 30/12/2015. displaying 01/01/2015 12:00:00 30/12/2015 12:00:00 am.
can me
try:
@item.date.tostring("dd mmm yyyy")
or use [displayformat] attribute on view model:
[displayformat(dataformatstring = "{0:dd mmm yyyy}")] public datetime date { get; set }
and in view:
@html.displayfor(x => x.date)
Comments
Post a Comment