ASP.net
Awesome
Learn
Forum
Buy
Sign In
this site works best with javascript enabled
Ask Question
Problem with awem.parseDate
Title:
B
I
{code}
?
Hello, var end = awem.parseDate('dd/mm/yyyy', $('#end').data('api').getDate()); return error: Object doesn't support property or method 'indexOf' awem.js (491,24) where datepicker looks like: @(Html.Awe().DatePicker("end") .ChangeMonth().ChangeYear() .MaxDate(DateTime.Now) .DefaultDate(DateTime.Now) .Value(DateTime.Now) .DateFormat("dd/MM/yyyy") .CssClass("w280") .ClearButton())
Save Changes
Cancel
Vladimir Kerzhentsev
asked 2 months ago
Answers
B
I
{code}
?
`api.getDate()` returns a `Date` object not a string, and `parseDate` parses a string into a Date object, I think what you want is `awem.formatDate` like this: awem.formatDate('dd/m/yy', $('#DateApi').data('api').getDate()); you can see examples here: http://localhost/AwesomeMvcDemo/DatePickerDemo#Datepicker-Api
Save Changes
Cancel
o
answered 2 months ago
Thank You for the explanation.
2 months ago
Vladimir Kerzhentsev
please
Sign In
to leave an answer