Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: HTML
Posted by: Amit Sarker
Added: Sep 5, 2018 7:53 AM
Views: 2
Tags: no tags
  1. <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.css">
  2. <script src="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.js"></script>
  3. <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
  4.     <input type="text" pattern="<?= date_pattern(); ?>" placeholder="<?= date_placeholder(); ?>" id="shipment_date" name="shipment_date" class="form-control timepicker" value="">
  5. </div>
  6.  
  7. <script type="text/javascript">
  8.     $('.timepicker').timepicker({
  9.         timeFormat: 'HH:mm',
  10.         interval: 30,
  11.         minTime: '00:00',
  12.         maxTime: '23:59',
  13.         defaultTime: '00',
  14.         startTime: '00:00',
  15.         dynamic: false,
  16.         dropdown: true,
  17.         scrollbar: true
  18.     });
  19.  
  20.  
  21. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.min.css"/>
  22. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.full.min.js"></script>
  23. <link href="<?= base_url('admin/assets/admin/datetimepicker/css/jquery.datetimepicker.min.css'); ?>" rel="stylesheet" type="text/css"/>
  24. <script src="<?= base_url('admin/assets/admin/datetimepicker/js/jquery.datetimepicker.full.min.js'); ?>" type="text/javascript"></script>
  25. <div class="col-sm-6">
  26.     <label class="control-label">Time</label>
  27.     <input id="time" class="form-control" name="schedule_time_new" value="<?php echo date('h:i'); ?>">
  28. </div>
  29.     $(function () {
  30.         var d = new Date(),
  31.                 sysTime = (d.getHours()) + ':' + (d.getMinutes());
  32.         $('#time').datetimepicker({
  33.             datepicker: false,
  34.             format: 'H:i',
  35.             step: 30,
  36.             autoclose: true,
  37.             value: sysTime
  38.         });
  39.     });