2
0
mirror of https://github.com/frappe/books.git synced 2024-12-25 20:11:15 +00:00
books/ui/components/controls/Date.vue
2019-07-18 16:11:15 +05:30

28 lines
570 B
Vue

<script>
import BaseDate from './BaseDate';
export default {
extends: BaseDate,
props: {
config: {
type: Object,
default: () => {
let dateFormat = {
'dd/MM/yyyy': 'd/m/Y',
'MM/dd/yyyy': 'm/d/Y',
'dd-MM-yyyy': 'd-m-Y',
'MM-dd-yyyy': 'm-d-Y',
'yyyy-MM-dd': 'Y-m-d'
};
let altFormat = dateFormat[frappe.SystemSettings.dateFormat];
return {
altInput: true,
dateFormat: 'Y-m-d',
altFormat: altFormat
};
}
}
}
};
</script>