Hi again,
I’m stuck in this, I don’t know what I’m missing.
I’m trying to use two conditions inside dmx-bin:disabled, the variables are obtained from database.
But it doesn’t works, if I use for separetly they works, but It’s necessary for me to meet these two conditions with date and time.
For example if I leave only one of these two condition it works.
Before I’m was testing with only one column in database with format DATETIME, but it doesn’t works, I thought that create separate column one for date and other for time will be more easily, but not.
That’s the deal, I don’t know why the conditions together won’t work.
For example, if TIME in database is less than current time it do not get deactivated, and DATE is bypassing.
Problem comes with “TIME”, looks like that"TIME" it not passing TRUE when two conditions are together.
No matter what date is in database, if “DATE” es less or greater than current time it doesn’t matter.
Totally true, one of these condition where false, mal formed. That’s because format from database is; 2021-09-03 14:38:28
and datetime var format from wrappler is; 2021-09-03T14:38:28-05:00
So, this is wrong, using two columns in database DATE and TIME, wrong because the format using of “formatDate”, unnecesary, can be shorter. dmx-bind:disabled="(var2.datetime.formatDate('HH:mm:ss') <= hora.value) && (var2.datetime.toISODate() <= asis.value)"
This is correct using “formatDate” using in db only one column DATETIME, ther shorter way. dmx-bind:disabled="var1.datetime.formatDate('y-MM-dd HH:mm:ss') <= asis.value"
If anyone need to disable or change dynamic attributes using DATATIME directly from database, it’s necessary to have “Date and Time” and “Moment”, but keep in mind using your corresponding locale of moment and of course using the right “formatDate”.