skyline/component-date-picker

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

v0.8.4 2020-12-12 16:04 UTC

This package is auto-updated.

Last update: 2021-10-12 18:23:14 UTC


README

The date picker component extends your application by adding a graphical interface for date and time input fields.

Installation

$ composer require skyline/component-date-picker

Usage

<div class="form-group">
    <div class="input-group">
        <input type="text" class="form-control" id="myPicker">
        <div class="input-group-prepend">
            <button class="btn btn-outline-primary" type="button" onclick="$('#myPicker').datepicker('open')">...</button>
        </div>
    </div>
</div>
<script type="application/javascript">
$(function() {
    $("#myPicker").datepicker("init", {
        autoOpen: false,
        autoUpdate: true,
        setDefaultDate: true,
        showClearBtn: true,
        mirror: "#result",
        mirrorFormat: "yyyy-mm-dd"
    })
}
</script>

Links

https://materializecss.com/pickers.html