2
0
mirror of https://github.com/frappe/books.git synced 2024-12-27 20:45:04 +00:00
books/ui/components/controls/Date.vue

28 lines
570 B
Vue
Raw Normal View History

2018-06-27 14:38:27 +00:00
<script>
import BaseDate from './BaseDate';
2018-06-27 14:38:27 +00:00
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
};
}
2018-06-27 14:38:27 +00:00
}
}
};
</script>