mirror of
https://github.com/frappe/books.git
synced 2024-11-09 23:30:56 +00:00
fix: return local date for display
This commit is contained in:
parent
3071040f8d
commit
39638ee9c7
@ -46,6 +46,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { DateTime } from 'luxon';
|
||||
import { fyo } from 'src/initFyo';
|
||||
import { defineComponent, nextTick } from 'vue';
|
||||
import Base from './Base.vue';
|
||||
@ -66,7 +67,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
if (value instanceof Date && !Number.isNaN(value.valueOf())) {
|
||||
return value.toISOString().split('T')[0];
|
||||
return DateTime.fromJSDate(value).toISODate();
|
||||
}
|
||||
|
||||
return '';
|
||||
@ -115,8 +116,6 @@ export default defineComponent({
|
||||
this.showInput = false;
|
||||
|
||||
let value: Date | null = new Date(target.value);
|
||||
value.setHours(0, 0, 0, 0);
|
||||
|
||||
if (Number.isNaN(value.valueOf())) {
|
||||
value = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user