JSFiddle - React, Tailwind, and code Playground

by amitaviv99

HTML

<link rel="stylesheet" href="http://cdn.sencha.com/ext-4.2.0-gpl/resources/css/ext-all.css">

JavaScript

Ext.onReady(function () {
Ext.create('Ext.form.Panel', {
    renderTo: Ext.getBody(),
    width: 300,
    bodyPadding: 10,
    title: 'Dates',
    items: [{
        xtype: 'datefield',
        anchor: '100%',
        fieldLabel: 'Date',
        name: 'date',
        // The value matches the format; will be parsed and displayed using that format.
        format: 'm d Y',
        value: '2 4 1978'
    }, {
        xtype: 'datefield',
        id: 'tst1',
        anchor: '100%',
        fieldLabel: 'Date',
        name: 'date',
        // The value does not match the format, but does match an altFormat; will be parsed
        // using the altFormat and displayed using the format.
        format: 'm d Y',
        altFormats: 'm,d,Y|m.d.Y',
        value: '2.4.1978'
    }]
});
    Ext.getCmp('tst1').initValue();
});