Magento 2 UI Component simplest way to show only time for date column

This is a very short blog, but i wrote this post to provide the quick and best solution to hide time for date column n UI component. For this, you have to simply provide the date format setting without time format as given below in your ui-component.xml file

<column name="salesperson_createddt" class="Magento\Ui\Component\Listing\Columns\Date" >
    <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
         <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="label" xsi:type="string" translate="true">Created Date</item>
         <item name="dateFormat" xsi:type="string">MMM d, Y</item>
      </item>
   </argument>
</column>

Leave a Comment.