Forum Stats

  • 3,872,216 Users
  • 2,266,407 Discussions
  • 7,911,107 Comments

Discussions

oj-input-date error icon bug

GoSaaS
GoSaaS Member Posts: 2 Red Ribbon

I see an error icon beside the date validation message even when the date is valid. As shown below, the red error icon shows on 12th September, where as this is a valid date to be selected. How to remove this error icon?



View:

<oj-input-date id="date" class="oj-form-control-max-width-md" on-keydown="[[ignoreCharacters]]" converter="[[dateConverter]]"

value="{{updatedDueDate}}" min="[[todaysDate]]" translations.date-time-range.hint.max="" readonly='[[!isEditable()]]' rows="1">

</oj-input-date>


Viewmodel:

self.todaysDate = ojconverterutils_i18n_1.IntlConverterUtils.dateToLocalIso(new Date());



Tagged:

Comments

  • My guess, is that you are setting this and the timezone is coming into play with the "time" part of "new Date()" which puts it outside of the range.

    Try typing in something like this: 09/12/22 and see what that does instead of using "new Date()"

    You can also do a console log of that new Date() to see exactly what is being returned.