\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->format('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) { }'));
?>

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');
?>

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());
?>

value

Specifies the selected date.

Returns

\Kendo\UI\DateInput

Parameters

$value date

Example

<?php
$dateInput = new \Kendo\UI\DateInput('DateInput');
$dateInput->value(new date());
?>