Deprecation warning - moment.min.js - value provided is not in a recognized RCF2822 or ISO format

NodeJS / Docker / MacOS

While testing v6.3.0 Beta, I got this warning message when resetting date input form field in a modal. Does the version of moment package included in Wappler need to be updated?

What date did you set as a value on the datepicker, it should be a valid ISO formatted string.

Hi Patrick,

I have done some more testing, and the warning is generated when there’s a dynamic value data binding. If I remove the dmx-bind:value binding, there’s no error.

There are two examples of Date Picker Input fields, and both are generating the warnings when resetting the forms.

The first example has value from the database as DATE only. The second example has local datetime var value as dynamic binding.

<input type="text" id="upd_item_invoice_dt" name="item_invoice_dt" is="dmx-date-picker" showdropdowns="true" class="form-control form-control-sm" dmx-bind:value="dd_list_items.data.item_invoice_dt" required="" format="DD MMM YYYY" readonly="true" dmx-bind:minyear="dd_list_items.data.item_invoice_dt.addYears(-3).formatDate('yyyy')" dmx-bind:maxdate="datedaylocal.datetime">
<input type="text" id="add_item_invoice_dt" name="item_invoice_dt" is="dmx-date-picker" showdropdowns="true" class="form-control form-control-sm" dmx-bind:value="datedaylocal.datetime" required="" format="DD MMM YYYY" readonly="true" dmx-bind:minyear="datedaylocal.datetime.addYears(-3).formatDate('yyyy')" dmx-bind:maxdate="datedaylocal.datetime">

How does the date/time string look like, if it looks like 2024-02-26 12:00:00 it should work. When it is some localized format it could throw an error.

Hi Patrick, as you have correctly identified, the warning is being generated because the date/time strings are in date format only. These errors are happening in Beta channel only.

I will try by adding the date formatter .formatDate('yyyy-MM-dd 00:00:00') to the bound values and see if that resolves the warning errors. I will update the post after testing this.

Fixed in Wappler 6.3.1

This topic was automatically closed after 45 hours. New replies are no longer allowed.