src/Forms/DateField.php 1 location
|
@@ 279-292 (lines=14) @@
|
| 276 |
|
return $formatter; |
| 277 |
|
} |
| 278 |
|
|
| 279 |
|
public function getAttributes() |
| 280 |
|
{ |
| 281 |
|
$attributes = parent::getAttributes(); |
| 282 |
|
|
| 283 |
|
$attributes['lang'] = i18n::convert_rfc1766($this->getLocale()); |
| 284 |
|
|
| 285 |
|
if ($this->getHTML5()) { |
| 286 |
|
$attributes['type'] = 'date'; |
| 287 |
|
$attributes['min'] = $this->getMinDate(); |
| 288 |
|
$attributes['max'] = $this->getMaxDate(); |
| 289 |
|
} |
| 290 |
|
|
| 291 |
|
return $attributes; |
| 292 |
|
} |
| 293 |
|
|
| 294 |
|
public function getSchemaDataDefaults() |
| 295 |
|
{ |
src/Forms/DatetimeField.php 1 location
|
@@ 90-103 (lines=14) @@
|
| 87 |
|
*/ |
| 88 |
|
protected $timezone = null; |
| 89 |
|
|
| 90 |
|
public function getAttributes() |
| 91 |
|
{ |
| 92 |
|
$attributes = parent::getAttributes(); |
| 93 |
|
|
| 94 |
|
$attributes['lang'] = i18n::convert_rfc1766($this->getLocale()); |
| 95 |
|
|
| 96 |
|
if ($this->getHTML5()) { |
| 97 |
|
$attributes['type'] = 'datetime-local'; |
| 98 |
|
$attributes['min'] = $this->internalToFrontend($this->getMinDatetime()); |
| 99 |
|
$attributes['max'] = $this->internalToFrontend($this->getMaxDatetime()); |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
return $attributes; |
| 103 |
|
} |
| 104 |
|
|
| 105 |
|
/** |
| 106 |
|
* @inheritDoc |