\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->fillMode('value')
// Output it
echo $dateInput->render();
?>
Methods
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) { }'));
?>
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');
?>
value
Specifies the selected date.
Returns
\Kendo\UI\DateInput
Parameters
$value date
Example
<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->value(new date());
?>