\Kendo\UI\TimePicker
A PHP wrapper for Kendo UI TimePicker.
Inherits from \Kendo\UI\Widget.
Usage
To use TimePicker 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 TimePicker
<?php
// Create a new instance of TimePicker and specify its id
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
// Configure it
$timePicker->animation(true)
// Output it
echo $timePicker->render();
?>
Methods
animation
Configures the opening and closing animations of the popup. Setting the animation option to false will disable the opening and closing animations. As a result the popup will open and close instantly. is not a valid configuration.
Returns
\Kendo\UI\TimePicker
Parameters
$value boolean|\Kendo\UI\TimePickerAnimation|array
Example - using boolean
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->animation(true);
?>
Example - using \Kendo\UI\TimePickerAnimation
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$animation = new \Kendo\UI\TimePickerAnimation();
$close = new \Kendo\UI\TimePickerAnimationClose();
$animation->close($close);
$timePicker->animation($animation);
?>
Example - using array
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$close = new \Kendo\UI\TimePickerAnimationClose();
$timePicker->animation(array('close' => $close));
?>
change
Fires when the selected date is changed For additional information check the change event documentation.
Returns
\Kendo\UI\TimePicker
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->change('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onChange(e) {
// handle the change event.
}
</script>
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->change('onChange');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->change(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
close
Fires when the time drop-down list is closed For additional information check the close event documentation.
Returns
\Kendo\UI\TimePicker
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->close('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onClose(e) {
// handle the close event.
}
</script>
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->close('onClose');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->close(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
componentType
Specifies the component type of the widget. "classic" - Uses the standard rendering of the widget. or "modern" - Uses new rendering with a fresh and modern look and feel..
Returns
\Kendo\UI\TimePicker
Parameters
$value string
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->componentType('value');
?>
culture
Specifies the culture info used by the widget.
Returns
\Kendo\UI\TimePicker
Parameters
$value string
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->culture('value');
?>
dateInput
Specifies if the TimePicker will use DateInput for editing value
Returns
\Kendo\UI\TimePicker
Parameters
$value boolean
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->dateInput(true);
?>
dates
Specifies a list of dates, which are shown in the time drop-down list. If not set, the TimePicker will auto-generate the available times.
Returns
\Kendo\UI\TimePicker
Parameters
$value array
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->dates(array());
?>
fillMode
Sets a value controlling how the color is applied. Can also be set to the following string values: "none"; "solid"; "flat" or "outline".
Returns
\Kendo\UI\TimePicker
Parameters
$value string
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->fillMode('value');
?>
format
Specifies the format, which is used to format the value of the TimePicker 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\TimePicker
Parameters
$value string
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->format('value');
?>
interval
Specifies the interval, between values in the popup list, in minutes.
Returns
\Kendo\UI\TimePicker
Parameters
$value float
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->interval(1);
?>
label
Adds a label before the timepicker. If the timepicker 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\TimePicker
Parameters
$value string|\Kendo\JavaScriptFunction|\Kendo\UI\TimePickerLabel|array
Example - using string
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->label('value');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->label(new \Kendo\JavaScriptFunction('function() { }'));
?>
Example - using \Kendo\UI\TimePickerLabel
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$label = new \Kendo\UI\TimePickerLabel();
$content = 'value';
$label->content($content);
$timePicker->label($label);
?>
Example - using array
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$content = 'value';
$timePicker->label(array('content' => $content));
?>
max
Specifies the end value in the popup list.
Returns
\Kendo\UI\TimePicker
Parameters
$value date
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->max(new date());
?>
messages
Allows localization of the strings that are used in the widget.
Returns
\Kendo\UI\TimePicker
Parameters
$value \Kendo\UI\TimePickerMessages|array
Example - using \Kendo\UI\TimePickerMessages
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$messages = new \Kendo\UI\TimePickerMessages();
$cancel = 'value';
$messages->cancel($cancel);
$timePicker->messages($messages);
?>
Example - using array
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$cancel = 'value';
$timePicker->messages(array('cancel' => $cancel));
?>
min
Specifies the start value in the popup list.
Returns
\Kendo\UI\TimePicker
Parameters
$value date
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->min(new date());
?>
open
Fires when the time drop-down list is opened For additional information check the open event documentation.
Returns
\Kendo\UI\TimePicker
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->open('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onOpen(e) {
// handle the open event.
}
</script>
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->open('onOpen');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->open(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
parseFormats
Specifies the formats, which are used to parse the value set with the value method or by direct input. If not set the value of the options.format will be used. Note that value of the format option is always used.
Returns
\Kendo\UI\TimePicker
Parameters
$value array
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->parseFormats(array());
?>
popup
The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.
Returns
\Kendo\UI\TimePicker
Parameters
$value \Kendo\UI\TimePickerPopup|array
Example - using \Kendo\UI\TimePickerPopup
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$popup = new \Kendo\UI\TimePickerPopup();
$appendTo = 'value';
$popup->appendTo($appendTo);
$timePicker->popup($popup);
?>
Example - using array
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$appendTo = 'value';
$timePicker->popup(array('appendTo' => $appendTo));
?>
rounded
Sets a value controlling the border radius. Can also be set to the following string values: "none"; "small"; "medium"; "large" or "full".
Returns
\Kendo\UI\TimePicker
Parameters
$value string
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->rounded('value');
?>
size
Sets a value controlling size of the component. Can also be set to the following string values: "small"; "medium"; "large" or "none".
Returns
\Kendo\UI\TimePicker
Parameters
$value string
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->size('value');
?>
value
Specifies the selected time.
Returns
\Kendo\UI\TimePicker
Parameters
$value date
Example
<?php
$timePicker = new \Kendo\UI\TimePicker('TimePicker');
$timePicker->value(new date());
?>