2018-06-27 14:38:27 +00:00
|
|
|
<script>
|
2018-07-14 07:16:40 +00:00
|
|
|
import BaseDate from './BaseDate';
|
2018-06-27 14:38:27 +00:00
|
|
|
|
|
|
|
export default {
|
2018-07-14 07:16:40 +00:00
|
|
|
extends: BaseDate,
|
|
|
|
props: {
|
|
|
|
config: {
|
|
|
|
type: Object,
|
2019-07-18 10:41:15 +00:00
|
|
|
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>
|