Ext.define('App.view.DatetimeInputField', {
    extend: 'Ext.form.field.Date',
    alias: 'widget.datetimeInputField',

    format: 'd/m/Y H:i:s',
    emptyText: 'DD/MM/YYYY HH:mm:ss',
    formatText: 'Expected date format DD/MM/YYYY HH:mm:ss.',
    hideTrigger: true,
    validator: function (val) {
        var regex = /(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.]\d{4} [012][0-9]:[0-5][0-9]:[0-5][0-9]/g;
        return val ? (regex.test(val) ? true : 'Expected date format DD/MM/YYYY HH:mm:ss.') : true;
    }
});