Esempio n. 1
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
?>
<div class="demo-section">
    <div class="k-rtl">
        <label for="datetimepicker">Choose date:</label>
<?php 
$dateTimePicker = new \Kendo\UI\DateTimePicker('datetimepicker');
echo $dateTimePicker->render();
?>
    </div>
</div>
<style scoped>
    .demo-section {
        width: 400px;
        text-align: center;
        margin: 50px auto;
        padding-top: 50px;
        padding-bottom: 50px;
    }
</style>
<?php 
require_once '../include/footer.php';
Esempio n. 2
0
<?php 
$start = new \Kendo\UI\DateTimePicker('start');
$start->value(new DateTime('now', new DateTimeZone('UTC')))->parseFormats(array('MM/dd/yyyy'))->change('startChange');
$end = new \Kendo\UI\DateTimePicker('end');
$end->value(new DateTime('now', new DateTimeZone('UTC')))->parseFormats(array('MM/dd/yyyy'))->change('endChange');
?>
<div class="demo-section" style="width:535px">
    <label for="start">Start date:</label>
    <?php 
echo $start->render();
?>

    <label for="end" style="margin-left:3em">End date:</label>
    <?php 
echo $end->render();
?>
</div>
<script>
    var start, end;

    function startChange() {
        var startDate = start.value();

        if (startDate) {
            startDate = new Date(startDate);
            startDate.setDate(startDate.getDate() + 1);
            end.min(startDate);
        }
    }