\Kendo\UI\DateRangePicker

A PHP wrapper for Kendo UI DateRangePicker.

Inherits from \Kendo\UI\Widget.

Usage

To use DateRangePicker 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 DateRangePicker

<?php
// Create a new instance of DateRangePicker and specify its id
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');

// Configure it
$dateRangePicker->adaptiveMode('value')

// Output it

echo $dateRangePicker->render();
?>

Methods

ARIATemplate

Specifies a template used to populate value of the aria-label attribute of the currently focused cell of the calendar..The parameters available for the template are: current - The current focused date.; valueType - The focused item value type - month, year and etc. or text - A text representing the focused value..

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->ARIATemplate('value');
?>

adaptiveMode

Specifies the adaptive rendering of the component.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->adaptiveMode('value');
?>

change

Fires when the selected date is changed For additional information check the change event documentation.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->change('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onChange(e) {
        // handle the change event.
    }
</script>
<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->change('onChange');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->change(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

close

Fires when the calendar is closed For additional information check the close event documentation.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->close('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onClose(e) {
        // handle the close event.
    }
</script>
<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->close('onClose');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->close(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

culture

Specifies the culture info used by the widget.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->culture('value');
?>

dates

Specifies a list of dates, which will be passed to the month template.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value array

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->dates(array());
?>

depth

Specifies the navigation depth. The following settings are available for the depth value: "month" - Shows the days of the month. (default value); "year" - Shows the months of the year.; "decade" - Shows the years of the decade. or "century" - Shows the decades from the century..

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->depth('value');
?>

disableDates

An array or function that will be used to determine which dates to be disabled for selection by the widget.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value array|\Kendo\JavaScriptFunction

Example - using array

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->disableDates(array());
?>

Example - using \Kendo\JavaScriptFunction

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->disableDates(new \Kendo\JavaScriptFunction('function() { }'));
?>

endField

Specifies the end field name for model binding.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->endField('value');
?>

fillMode

Sets a value controlling how the color is applied.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->fillMode('value');
?>

The template which renders the footer of the calendar. If false, the footer will not be rendered.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->footer('value');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->footer(new \Kendo\JavaScriptFunction('function() { }'));
?>

format

Specifies the format, which is used to format the value of the DateRangePicker displayed in the input. The format also will be used to parse the input.For more information on date and time formats please refer to Date Formatting.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->format('value');
?>

labels

Determines if the labels for the inputs will be visible.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value boolean

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->labels(true);
?>

max

Specifies the maximum date, which the calendar can show.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value date

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->max(new date());
?>

messages

Allows localization of the strings that are used in the widget.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value \Kendo\UI\DateRangePickerMessages|array

Example - using \Kendo\UI\DateRangePickerMessages

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$messages = new \Kendo\UI\DateRangePickerMessages();
$endLabel = 'value';
$messages->endLabel($endLabel);
$dateRangePicker->messages($messages);
?>

Example - using array

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$endLabel = 'value';
$dateRangePicker->messages(array('endLabel' => $endLabel));
?>

min

Specifies the minimum date that the calendar can show.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value date

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->min(new date());
?>

month

Templates for the cells rendered in the calendar "month" view.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value \Kendo\UI\DateRangePickerMonth|array

Example - using \Kendo\UI\DateRangePickerMonth

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$month = new \Kendo\UI\DateRangePickerMonth();
$content = 'value';
$month->content($content);
$dateRangePicker->month($month);
?>

Example - using array

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$content = 'value';
$dateRangePicker->month(array('content' => $content));
?>

open

Fires when the calendar is opened For additional information check the open event documentation.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->open('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onOpen(e) {
        // handle the open event.
    }
</script>
<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->open('onOpen');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->open(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

range

Configures the Kendo UI DateRangePicker range settings.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value \Kendo\UI\DateRangePickerRange|array

Example - using \Kendo\UI\DateRangePickerRange

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$range = new \Kendo\UI\DateRangePickerRange();
$end = new date();
$range->end($end);
$dateRangePicker->range($range);
?>

Example - using array

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$end = new date();
$dateRangePicker->range(array('end' => $end));
?>

rounded

Sets a value controlling the border radius.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->rounded('value');
?>

size

Sets the size of the component.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->size('value');
?>

start

Specifies the start view. The following settings are available for the start value: "month" - Shows the days of the month.; "year" - Shows the months of the year.; "decade" - Shows the years of the decade. or "century" - Shows the decades from the century..

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->start('value');
?>

startField

Specifies the start field name for model binding.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value string

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->startField('value');
?>

weekNumber

If set to true a week of the year will be shown on the left side of the calendar. It is possible to define a template in order to customize what will be displayed.

Returns

\Kendo\UI\DateRangePicker

Parameters

$value boolean

Example

<?php
$dateRangePicker = new \Kendo\UI\DateRangePicker('DateRangePicker');
$dateRangePicker->weekNumber(true);
?>
In this article
Not finding the help you need?