\Kendo\UI\DateInput
A PHP wrapper for Kendo UI DateInput.
Inherits from \Kendo\UI\Widget.
Usage
To use DateInput in a PHP page instantiate a new instance, configure it via the available
configuration methods and output it by echo
-ing the result of the render method.
Using Kendo DateInput
<?php
// Create a new instance of DateInput and specify its id
$dateInput = new \Kendo\UI\DateInput('DateInput');
// Configure it
$dateInput->autoAdjust(true)
// Output it
echo $dateInput->render();
?>
Methods
autoAdjust
If this property is enabled and you have configured min and/or max values, and the user enters a value that falls out of that range, the value will automatically be set to either the minimum or maximum allowed value.
Returns
\Kendo\UI\DateInput
Parameters
$value boolean
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->autoAdjust(true);
?>
autoCorrectParts
Sets a value that indicates whether to automatically correct the segment when out of range
Returns
\Kendo\UI\DateInput
Parameters
$value boolean
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->autoCorrectParts(true);
?>
autoSwitchKeys
A string array representing keys that when pressed will force a move to the next segment. By default the culture specific symbols that match / and : are used.
Returns
\Kendo\UI\DateInput
Parameters
$value array
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->autoSwitchKeys(array());
?>
autoSwitchParts
A value indicating whether to automatically move to the next segment after a valid value is provided for the current
Returns
\Kendo\UI\DateInput
Parameters
$value boolean
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->autoSwitchParts(true);
?>
change
Fires when the selected date is changed For additional information check the change event documentation.
Returns
\Kendo\UI\DateInput
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->change('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onChange(e) {
// handle the change event.
}
</script>
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->change('onChange');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->change(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
enableMouseWheel
A value indicating whether the mouse scroll can be used to increase/decrease the segments values
Returns
\Kendo\UI\DateInput
Parameters
$value boolean
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->enableMouseWheel(true);
?>
fillMode
Sets a value controlling how the color is applied.
Returns
\Kendo\UI\DateInput
Parameters
$value string
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->fillMode('value');
?>
format
Specifies the format, which is used to format the value of the DateInput displayed in the input. The format also will be used to parse the input.
Returns
\Kendo\UI\DateInput
Parameters
$value string
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->format('value');
?>
label
Adds a label before the dateinput. If the dateinput has no id attribute, a generated id will be assigned. The string and the function parameters are setting the inner HTML of the label.
Returns
\Kendo\UI\DateInput
Parameters
$value string|\Kendo\JavaScriptFunction|\Kendo\UI\DateInputLabel|array
Example - using string
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->label('value');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->label(new \Kendo\JavaScriptFunction('function() { }'));
?>
Example - using \Kendo\UI\DateInputLabel
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$label = new \Kendo\UI\DateInputLabel();
$content = 'value';
$label->content($content);
$dateInput->label($label);
?>
Example - using array
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$content = 'value';
$dateInput->label(array('content' => $content));
?>
max
Specifies the maximum date which can be entered in the input.
Returns
\Kendo\UI\DateInput
Parameters
$value date
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->max(new date());
?>
messages
The messages that DateInput uses. Use it to customize or localize the placeholders of each date/time part.
Returns
\Kendo\UI\DateInput
Parameters
$value \Kendo\UI\DateInputMessages|array
Example - using \Kendo\UI\DateInputMessages
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$messages = new \Kendo\UI\DateInputMessages();
$day = 'value';
$messages->day($day);
$dateInput->messages($messages);
?>
Example - using array
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$day = 'value';
$dateInput->messages(array('day' => $day));
?>
min
Specifies the minimum date that which be entered in the input.
Returns
\Kendo\UI\DateInput
Parameters
$value date
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->min(new date());
?>
rounded
Sets a value controlling the border radius.
Returns
\Kendo\UI\DateInput
Parameters
$value string
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->rounded('value');
?>
size
Sets the size of the component.
Returns
\Kendo\UI\DateInput
Parameters
$value string
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->size('value');
?>
steps
An object with the different steps for incrementing/decrementing the various segments
Returns
\Kendo\UI\DateInput
Parameters
$value \Kendo\UI\DateInputSteps|array
Example - using \Kendo\UI\DateInputSteps
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$steps = new \Kendo\UI\DateInputSteps();
$day = 1;
$steps->day($day);
$dateInput->steps($steps);
?>
Example - using array
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$day = 1;
$dateInput->steps(array('day' => $day));
?>
twoDigitYearMax
The maximum year value that is considered part of the current century.
Returns
\Kendo\UI\DateInput
Parameters
$value float
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->twoDigitYearMax(1);
?>
value
Specifies the selected date.
Returns
\Kendo\UI\DateInput
Parameters
$value date
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->value(new date());
?>