In this post I am going to explain how to add date picker field in magento 2 system.xml file or you can say in magento 2 system configuration.

Here, I am using my custom module – Ht_Mymodule

First, open your module’s system.xml file and add below code in it.

File Path: app/code/Ht/Mymodule/etc/adminhtml/system.xml

Now we have added “Ht\Mymodule\Block\DatePicker” as frontend model. So now we are going to create DatePicker class in file DatePicker.php

Related Read:  Magento 2 intl php extension missing

File Path: app/code/Ht/Mymodule/Block/DatePicker.php