How to add CMS Static Block Programmatically using Setup Patchdata in Magento 2?

From Magento 2.3, Core modules use the declarative schema approach rather than setup upgrade scripts. This is the new recommended approach for Magento versions 2.3 and upper version.

All the InstallData and UpgrageData will be replaced by Data Patch Versioning.

Now you have to create Setup/Patch/Data folder and create the class file for create/update attribute or add sample data in Magento. Continue reading “How to add CMS Static Block Programmatically using Setup Patchdata in Magento 2?”

How to add CMS Page Programmatically using Patch Data in Magento 2?

From Magento 2.3, Core modules use the declarative schema approach rather than setup upgrade scripts. This is the new recommended approach for Magento versions 2.3 and upper version.

All the InstallData and UpgrageData will be replaced by Data Patch Versioning.

Now you have to create Setup/Patch/Data folder and create the class file for create/update attribute or add sample data in Magento.

Continue reading “How to add CMS Page Programmatically using Patch Data in Magento 2?”

Magento 2 Display Date Range field in Custom form.

You can add custom Date range field in your form using mage/calender widget of Magento.

DateRange field used for control two date range for a specific time.
DateRange widget used for Booking Return AirTicket, Train Ticket.

You can check for  Add Datepicker in custom form

Its also used for a show a Report for a specific time period. Continue reading “Magento 2 Display Date Range field in Custom form.”