PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, August 22, 2022

[FIXED] How to call a datepicker in a Magento 2 system.xml file

 August 22, 2022     magento2     No comments   

Issue

I need to add date type in system.xml file with the datepicker option in Magento 2. Can anyone tell me how to call a datepicker?


Solution

Hi You can use 2 options for this case:

1 <frontend_model>Magento\Config\Block\System\Config\Form\Field\Datetime</frontend_model>

2 <source_model>Magento\Config\Model\Config\Source\Date\Short</source_model>

See more info from vendor/magento/magento-config



Answered By - HoangHieu
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing