bbcreation/datetimepicker

Fork of date/time picker component designed to work with Tailwind CSS and Momentjs

Installs: 23

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 4 502

Language:CSS

Type:component

4.17.47 2017-02-28 14:32 UTC

This package is auto-updated.

Last update: 2020-06-18 01:45:36 UTC


README

Fork to use with Tailwind CSS / Turbolinks / Laravel LiveWire

Use with Turbolinks and Laravel LiveWire:

Script:

<script type="text/javascript">
    function Datepicker() {
        $('#datetimepicker').datetimepicker({
            format: 'YYYY-MM-DD H:mm'
        }).on("dp.change", function (e) {
            @this.set('pay_date', e.date);
        });
    };
    window.addEventListener('turbolinks:load', Datepicker);
</script>

HTML:

<label>
    <div wire:ignore>
        <input  type="text" class="form-input block w-full text-xs" placeholder="{{ __('Pay Date') }}"  id="datetimepicker">
    </div>
</label>

INFO:

Enter the code between and add height so that nothing obstructs:

<div style="position: relative; height: 90vh;></div>