Datepicker tidak berfungsi ada yang salah?

ane mau pake datepicker buat disable past date giman ya ini kok ga bisa tampil pas kolom di klik apa yang salah ?

tempat naro link jqueryny

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title><?= $title; ?></title>

    <!-- Custom fonts for this template-->
    <link href="<?= base_url('assets/'); ?>vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
    <link href="<?= base_url('assets/'); ?>https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
    <link href="https://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css" rel="stylesheet">
    <!-- Custom styles for this template-->
    <link href="<?= base_url('assets/'); ?>css/sb-admin-2.min.css" rel="stylesheet">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

</head>

<body id="page-top">

    <!-- Page Wrapper -->
    <div id="wrapper">

<!-- Begin Page Content -->
<div class="container-fluid">

    <!-- Page Heading -->
    <h1 class="h3 mb-4 text-gray-800"><?= $title; ?></h1>

    <div class="row">
        <div class="col-lg">
            <?php if (validation_errors()) : ?>
                <div class="alert alert-danger" role="alert">
                    <?= validation_errors(); ?>
                </div>

            <?php endif; ?>
            <?= $this->session->flashdata('message'); ?>

            <a href="" class="btn btn-primary mb-3" data-toggle="modal" data-target="#orderMenu">Add New Order</a>
            <hr>
            <h3>Barang Tersedia</h3>

            <div class="row">
                <table class="table table-hover">
                    <thead>
                        <tr>
                            <th scope="col">#</th>
                            <th scope="col">Nama Barang</th>
                            <th scope="col">Keterangan</th>
                            <th scope="col">Harga</th>
                            <th scope="col">Stok</th>

                        </tr>
                    </thead>
                    <tbody>
                        <?php $i = 1; ?>

                        <?php foreach ($barang as $b) : ?>
                            <tr>
                                <th scope="row"><?= $i++; ?></th>
                                <td><?= $b['nama_brg']; ?></td>
                                <td><?= $b['keterangan']; ?></td>
                                <td><?= $b['harga']; ?></td>
                                <td><?= $b['stok']; ?></td>

                            </tr>
                        <?php endforeach; ?>

                    </tbody>
                </table>
            </div>
            <br>
            <hr>
            <h3>Pesanan Anda</h3>
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th scope="col">#</th>
                        <th scope="col">Nama Pelanggan</th>
                        <th scope="col">Alamat</th>
                        <th scope="col">Nama Barang</th>
                        <th scope="col">Jumlah</th>
                        <th scope="col">Tanggal Pengiriman</th>
                        <th scope="col">Harga Satuan</th>
                        <th scope="col">Status</th>

                    </tr>
                </thead>
                <tbody>
                    <?php $i = 1; ?>

                    <?php foreach ($order as $o) : ?>
                        <tr>
                            <th scope="row"><?= $i++; ?></th>
                            <td><?= $o['pelanggan']; ?></td>
                            <td><?= $o['alamat']; ?></td>
                            <td><?= $o['nama_brg']; ?></td>
                            <td><?= $o['jumlah']; ?></td>
                            <td><?= $o['tgl_kirim']; ?></td>
                            <td>Rp.<?php echo number_format($o['harga'], 0, '', '.'); ?></td>
                            <td><?php if ($o['status'] == '1') { ?>
                                    <strong><span style="color:gold;">Proses</span></strong>
                                <?php } else if ($o['status'] == '2') { ?>
                                    <strong><span style="color: blue;">Dikirim</span></strong>
                                <?php } else if ($o['status'] == '3') { ?>
                                    <strong><span style="color: green;">Selesai</span></strong>
                                <?php } else { ?>
                                    <strong><span style="color: red">Belum Bayar</span></strong>

                                    <a class="badge badge-primary" href="<?= base_url(); ?>home/pembayaran/<?= $o['id_order']; ?>">Bayar</a>
                                    <a class="badge badge-danger" href="<?= base_url(); ?>home/hapus_order/<?= $o['id_order']; ?>">Delete</a>
                                <?php } ?>
                            </td>

                        </tr>
                    <?php endforeach; ?>

                </tbody>
            </table>
        </div>

    </div>
    <!-- /.container-fluid -->

</div>
<!-- End of Main Content -->
<!-- Button trigger modal -->

<!-- Modal -->
<div class="modal fade" id="orderMenu" tabindex="-1" role="dialog" aria-labelledby="orderMenu" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="orderMenu">Order</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <?php echo form_open_multipart('home/order'); ?>

            <div class="modal-body">
                <div class="form-group">
                    <input type="hidden" class="form-control" id="id_order" name="id_order" placeholder="Nama Pelanggan">
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" id="pelanggan" name="pelanggan" placeholder="Nama Pelanggan">
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" id="alamat" name="alamat" placeholder="Alamat Pelanggan">
                </div>
                <div class="form-group">
                    <select name="nm_barang" id="nm_barang" class="form-control">
                        <option value="">Select Menu</option>
                        <?php foreach ($nama_brg as $nm) : ?>
                            <option value="<?= $nm['id_brg']; ?>"><?= $nm['nama_brg']; ?> </option>
                        <?php endforeach; ?>
                    </select>
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" id="jumlah" name="jumlah" placeholder="Jumlah">
                </div>
                <div class="form-group">
                    <input class="form-control" type="text" name="tgl_kirim" id="datepicker">
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" id="email" name="email" value="<?= $user['email'] ?>" readonly>
                    <input type="hidden" class="form-control" id="id_pelanggan" name="id_pelanggan" value="<?= $_SESSION['email'] ?>">

                </div>
                <div class="form-group">
                    <input class="form-control" type="hidden" name="status" id="status" value="0" />
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                <button type="submit" class="btn btn-primary">Add</button>
            </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function() {
        $("#datepicker").datepicker({
            format: 'yyyy-mm-dd hh:ii',
            minDate: new Date()
        });
    });
</script>

ini formny saya pake CI

avatar werich2
@werich2

5 Kontribusi 0 Poin

Dipost 4 tahun yang lalu

Belum ada Jawaban. Jadi yang pertama Jawaban

Login untuk ikut Jawaban