HTML 5 compatible date / time input field for Nette.

Installs: 2 090

Dependents: 2

Stars: 9

Watchers: 3

Forks: 8

Open Issues: 4

Language: JavaScript

1.0.8 2015-06-14 18:31 UTC


Form component for selecting date and time values.

In PHP this addon works with DateTime objects, in the browser it uses jqueryUI calendar with timepicker addon. Look at some exmaples at the demo page.


$ composer require voda/date-input:~1.0.0

package can be also installed using bower: $ bower install voda-date-input --save

insert required javascript and style files into your layout (order of scripts is important):

<script type='text/javascript' src="{$basePath}/scripts/jquery-ui-timepicker-addon.js"></script>
<script type='text/javascript' src="{$basePath}/scripts/dateInput.js"></script>
<link rel="stylesheet" type="text/css" href="{$basePath}/styles/jquery-ui-timepicker-addon.css">
<link rel="stylesheet" type="text/css" href="{$basePath}/styles/dateInput.css">

register the addon in your bootstrap.php:


initialize the calendar using javascript:

$(document).ready(function() {
        datetime: {
            dateFormat: 'd.m.yy',
            timeFormat: 'H:mm',
            options: { // options for type=datetime
                changeYear: true
        'datetime-local': {
            dateFormat: 'd.m.yy',
            timeFormat: 'H:mm'
        date: {
            dateFormat: 'd.m.yy'
        month: {
            dateFormat: 'MM yy'
        week: {
            dateFormat: "w. 'week of' yy"
        time: {
            timeFormat: 'H:mm'
        options: { // global options
            closeText: "Close"