Responsibility: define getters and setters for field properties: min, max and step, for fields with type date and extended field types from date type.
Interface for classes:
- \MvcCore\Ext\Forms\Fields\Date - \MvcCore\Ext\Forms\Fields\DateTime - \MvcCore\Ext\Forms\Fields\Month - \MvcCore\Ext\Forms\Fields\Time - \MvcCore\Ext\Forms\Fields\Week
- \MvcCore\Ext\Forms\Validators\Date
Methods summary
public
DateTimeInterface|string|null
|
#
GetMin( boolean $getFormatedString = FALSE )
Get minimum value for Date, Time, DateTime, Week
and Month field(s) in string value.
Example string values for date and time fields:
- Date => "2017-01-01" (with $field->format = "Y-m-d";)
-Time => "14:00"(with$field->format= "H:i";)
- DateTime => "2017-01-01 14:00" (with $field->format = "Y-m-d H:i";)
-Week => "2017-W01"(with$field->format= "o-\WW";)
- Month => "2017-01" (with $field->format = "Y-m";`)
Get minimum value for Date, Time, DateTime, Week
and Month field(s) in string value.
Example string values for date and time fields:
- Date => "2017-01-01" (with $field->format = "Y-m-d";)
-Time => "14:00"(with$field->format= "H:i";)
- DateTime => "2017-01-01 14:00" (with $field->format = "Y-m-d H:i";)
-Week => "2017-W01"(with$field->format= "o-\WW";)
- Month => "2017-01" (with $field->format = "Y-m";`)
Parameters
- $getFormatedString
- Get value as formatted string by
$this->format.
Returns
DateTimeInterface|string|null
See
https://www.wufoo.com/html5/date-type/
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-min
|
public
MvcCore\Ext\Forms\Field
|
#
SetMin( DateTimeInterface|string|integer $min )
Set minimum value for Date, Time, DateTime, Week
and Month field(s) in string value.
Example string values for date and time fields:
- Date => "2017-01-01" (with $field->format = "Y-m-d";)
-Time => "14:00"(with$field->format= "H:i";)
- DateTime => "2017-01-01 14:00" (with $field->format = "Y-m-d H:i";)
-Week => "2017-W01"(with$field->format= "o-\WW";)
- Month => "2017-01" (with $field->format = "Y-m";`)
Set minimum value for Date, Time, DateTime, Week
and Month field(s) in string value.
Example string values for date and time fields:
- Date => "2017-01-01" (with $field->format = "Y-m-d";)
-Time => "14:00"(with$field->format= "H:i";)
- DateTime => "2017-01-01 14:00" (with $field->format = "Y-m-d H:i";)
-Week => "2017-W01"(with$field->format= "o-\WW";)
- Month => "2017-01" (with $field->format = "Y-m";`)
Parameters
Returns
See
https://www.wufoo.com/html5/date-type/
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-min
|
public
DateTimeInterface|string|null
|
#
GetMax( boolean $getFormatedString = FALSE )
Get maximum value for Date, Time, DateTime, Week
and Month field(s) in string value.
Example string values for date and time fields:
- Date => "2018-06-24" (with $field->format = "Y-m-d";)
-Time => "20:00"(with$field->format= "H:i";)
- DateTime => "2018-06-24 20:00" (with $field->format = "Y-m-d H:i";)
-Week => "2018-W25"(with$field->format= "o-\WW";)
- Month => "2018-06" (with $field->format = "Y-m";`)
Get maximum value for Date, Time, DateTime, Week
and Month field(s) in string value.
Example string values for date and time fields:
- Date => "2018-06-24" (with $field->format = "Y-m-d";)
-Time => "20:00"(with$field->format= "H:i";)
- DateTime => "2018-06-24 20:00" (with $field->format = "Y-m-d H:i";)
-Week => "2018-W25"(with$field->format= "o-\WW";)
- Month => "2018-06" (with $field->format = "Y-m";`)
Parameters
- $getFormatedString
- Get value as formatted string by
$this->format.
Returns
DateTimeInterface|string|null
See
https://www.wufoo.com/html5/date-type/
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max
|
public
MvcCore\Ext\Forms\Field
|
#
SetMax( DateTimeInterface|string|integer $max )
Set maximum value for Date, Time, DateTime, Week
and Month field(s) in string value.
Example string values for date and time fields:
- Date => "2018-06-24" (with $field->format = "Y-m-d";)
-Time => "20:00"(with$field->format= "H:i";)
- DateTime => "2018-06-24 20:00" (with $field->format = "Y-m-d H:i";)
-Week => "2018-W25"(with$field->format= "o-\WW";)
- Month => "2018-06" (with $field->format = "Y-m";`)
Set maximum value for Date, Time, DateTime, Week
and Month field(s) in string value.
Example string values for date and time fields:
- Date => "2018-06-24" (with $field->format = "Y-m-d";)
-Time => "20:00"(with$field->format= "H:i";)
- DateTime => "2018-06-24 20:00" (with $field->format = "Y-m-d H:i";)
-Week => "2018-W25"(with$field->format= "o-\WW";)
- Month => "2018-06" (with $field->format = "Y-m";`)
Parameters
Returns
See
https://www.wufoo.com/html5/date-type/
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max
|
public
integer|null
|
#
GetStep( )
Get step value for Date, Time, DateTime, Week
and Month fields, always in integer.
For Date and DateTime fields, step is int, number of days.
For Time fields, step is int, number of seconds.
For Week and Month fields, step is int, number of weeks or months...
Get step value for Date, Time, DateTime, Week
and Month fields, always in integer.
For Date and DateTime fields, step is int, number of days.
For Time fields, step is int, number of seconds.
For Week and Month fields, step is int, number of weeks or months...
Returns
integer|null
See
https://www.wufoo.com/html5/date-type/
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step
|
public
MvcCore\Ext\Forms\Field
|
#
SetStep( integer $step )
Set step value for Date, Time, DateTime, Week
and Month fields, always in integer.
For Date and DateTime fields, step is int, number of days.
For Time fields, step is int, number of seconds.
For Week and Month fields, step is int, number of weeks or months...
Set step value for Date, Time, DateTime, Week
and Month fields, always in integer.
For Date and DateTime fields, step is int, number of days.
For Time fields, step is int, number of seconds.
For Week and Month fields, step is int, number of weeks or months...
Parameters
Returns
See
https://www.wufoo.com/html5/date-type/
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step
|