JHtml::_('calendar', 'now', 'calendar', 'calendar', '%Y-%m-%d');
JHtml::_('calendarRange', '2021-01-01', '2021-12-31', '%Y-%m-%d', 'calendar', 'calendar', '');
JHtml::_('calendar', $value, 'my-input-field', 'my-input-field', '%Y-%m-%d', array('class'=>'inputbox', 'size'=>'10', 'maxlength'=>'10'));This code will add a calendar popup to a form input field with the ID "my-input-field". The value of the input field will be set to $value. The format used for displaying the date is YYYY-MM-DD. The options array specifies the class, size, and maximum length of the input field. JHtml calendar is part of the Joomla framework and is included with the package library.