Merge pull request #240 from directus/datetime-emit-bug

fix datetime emiting without changes
This commit is contained in:
Rijk van Zanten
2020-09-09 15:15:42 -04:00
committed by GitHub

View File

@@ -137,8 +137,9 @@ export default defineComponent({
const { year, month, date, hours, minutes, seconds, period } = newValue;
const asDate = new Date(year, month, date, period === 'am' ? hours : hours + 12, minutes, seconds);
emit('input', formatISO(asDate));
if(valueAsDate.value?.getTime() != asDate.getTime())
emit('input', formatISO(asDate));
}
},
{