c# - jquery function property doesn't recognize @Model.EndDate value -
first , foremost here link countdown timer using: http://www.jqueryscript.net/time-clock/slim-countdown-timer-plugin-with-jquery-downcount.html
i using visual studio, c# mvc asp.net, entity framework, bootstrap & razor cshtml pages , jquery.
it works fine if set date manually this:
<script> $('.countdown').downcount({ date: '06/06/2015 12:00:00', offset: +1 }); </script>
however, need call object entity framework, enddate said object , use set countdown timer. tried calling object (inside html page):
$('.countdown').downcount({ date: '@model.enddate', offset: +1 });
apparently, property doesn't recognize @model.enddate value i'm trying pass, , sees null value. how make recognize value?
just make property call strenddate
formatting of date , set property on server send down string, js doesnt interfere date values.
Comments
Post a Comment