21 $html =
'<input type="text" name="' . $this->getName() .
'" id="' . $this->getId() .
'" ';
22 $html .=
'value="' . $this->
escapeHtml($this->getValue()) .
'" ';
23 $html .=
'class="' . $this->getClass() .
'" ' . $this->getExtraParams() .
'/> ';
24 $calendarYearsRange = $this->getYearsRange();
25 $changeMonth = $this->getChangeMonth();
26 $changeYear = $this->getChangeYear();
27 $maxDate = $this->getMaxDate();
28 $showOn = $this->getShowOn();
29 $firstDay = $this->getFirstDay();
31 $html .=
'<script type="text/javascript"> 32 require(["jquery", "mage/calendar"], function($){ 37 ($this->getTimeFormat() ?
'true' :
'false') .
40 ($this->getTimeFormat() ?
'timeFormat: "' .
41 $this->getTimeFormat() .
45 $this->getDateFormat() .
51 ($calendarYearsRange ?
'yearRange: "' .
56 (
string)new \Magento\Framework\Phrase(
59 '"' . ($maxDate ?
', maxDate: "' . $maxDate .
'"' :
'') .
60 ($changeMonth ===
null ?
'' :
', changeMonth: ' . $changeMonth) .
61 ($changeYear ===
null ?
'' :
', changeYear: ' . $changeYear) .
62 ($showOn ?
', showOn: "' . $showOn .
'"' :
'') .
63 ($firstDay ?
', firstDay: ' . $firstDay :
'') .
78 if ($this->getFormat() && $this->getValue()) {
79 return strftime($this->getFormat(), strtotime($this->getValue()));
81 return htmlspecialchars($this->getValue());
escapeHtml($data, $allowedTags=null)