ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
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 at 04 Oct 2019
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
Omu
answered at 04 Oct 2019
Thank You for the explanation.
at 04 Oct 2019
Vladimir Kerzhentsev
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK