your text
i'm trying to display the bootstrap datetime picker in my blade file but a text field displays instead
here is my blade file code :
`
@extends('layouts.master')
@include('navbar.header')
@section('content')
@include('sidebar.form')
@section('scripts')
<script src="{{ asset('js/app.js') }}" defer></script>
<script>
$(document).ready(function () {
$('#datetimepicker').datetimepicker({
format: 'YYYY-MM-DD HH:mm:ss',
useCurrent: false,
sideBySide: true,
minDate: moment(),
});
});
</script>
@endsection
@section('styles')
<link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('node_modules/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css') }}">
<script src="{{ asset('node_modules/moment/min/moment.min.js') }}"></script>
<script src="{{ asset('node_modules/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js') }}"></script>
@endsection
<div class="form-group row">
<label class="col-form-label col-4">Date d'expiration</label>
{{--<div class="col-8" >
@error('expire')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div> --}}
<div class='input-group date' id='datetimepicker'>
<input type='text' class="form-control" name="expire" id="datetimepicker" required/>
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>`
your text
at first i tried the html input field datetime-local but it doesn't match my requirements because i want the user to choose a datetime from the current date and onwards and it's giving me to select between a range of time witch i don't want i want the user to be able to choose the date he wants in the future for his records
that's why i tried the bootstrap datetime picker but it does not diplay.
any help!