0

I've been trying to get the Magento Admin to let me enter a time using the proper components, however it appears to error out. I can't even get it to match the Date above it. Posted below are the errors:

JS Stacktrace

And Here is the Component being rendered with the error:

Component not rendering properly

Here is the XML for the form:

<column name="date">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="editor" xsi:type="array">
                    <item name="editorType" xsi:type="string">text</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                    </item>
                </item>
                <item name="label" xsi:type="string" translate="true">Date</item>
            </item>
        </argument>
    </column>
    <column name="day_start_time"  >
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">Created At</item>
                <item name="filter" xsi:type="string">dateRange</item>
                <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
                <item name="dataType" xsi:type="string">date</item>
                <item name="dateFormat" xsi:type="string" translate="true">YYYY-MM-dd hh:mm a</item>
            </item>
        </argument>
    </column>

Here is the install Scheme:

->addColumn(
        'date',
        \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
        255,
        [ 'nullable' => false ],
        'Day of operation'
    )->addColumn(
        'day_start_time',
        \Magento\Framework\DB\Ddl\Table::TYPE_DATETIME,
        255,
        [
            'nullable' => false,
            'default' => date('Y-m-d H:i:s'),
        ],
        'Business operating opening time'
    )

Any assistance would be massively appreciated. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.