Default date in date picker - Does the dmx-datetime now need to be interval="days"

Not going to mark this as a bug.. but it could possibly be.. but first want to find out .. maybe its the new way of doing things...

I have a
<dmx-datetime id="var1" utc="true"></dmx-datetime>

and my date picker
<input id="grading_date_start_date" name="grading_date_start_date" type="text" is="dmx-date-picker" format="YYYY-MM-DD" maxlength="100" class="form-control" dmx-bind:value="{{var1.datetime.formatDate('yyyy-MM-dd')}}" required readonly>

It sets the date as on my computer.. but if i select a future date it jumps back to todays date... it did not do this in AC1.. BUT as said.. maybe its the new way of doing this.. can somebody please confirm

BUT if i change the interval="days" on the dmx-datetime then it does not jump.
<dmx-datetime id="var1" utc="true" interval="days"></dmx-datetime>

With no interval set..

With days interval set

Yes if you have it set to second it will refresh every second. Also why do you have a date picker on a read only field?

The interval is what time is between the updates, so interval days will only update the component once per day.

1 Like

There is method behind the madness... here is SA we use date format 01-12-2024 ... eg dd-mm-yyyy and not the other way around.. Hence i dont want the client to make the mistake.. of doing month first.. then day.. and then year.. So basically im forcing the client with a readonly to select out of the drop down.. rather then making a mistake typing it in :slight_smile:

Thank you @patrick for confirming that.. i have made a note that AC2 works that way around now.. Cool .. to updating my scripts I go.. :slight_smile: