Javascript 使用Laravel上的daterangepicker检查数据库中的日期
我想和daterangepicker和Laravel做点什么 我已创建此表:Javascript 使用Laravel上的daterangepicker检查数据库中的日期,javascript,php,laravel,Javascript,Php,Laravel,我想和daterangepicker和Laravel做点什么 我已创建此表: Schema::create('events', function (Blueprint $table) { $table->increments('id'); $table->string('name', 255); $table->string('phone', 255); $table->tex
Schema::create('events', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 255);
$table->string('phone', 255);
$table->text('adress');
$table->string('cp', 255);
$table->string('town', 255);
$table->timestamp('start_time');
$table->timestamp('end_time')->nullable();
$table->text('special');
$table->integer('active')->default(0);
$table->timestamps();
});
}
我有一个刀片模板:
<!-- TITLE END -->
{!! Form::open(array('route' => 'reserver.store')) !!}
<div class="form-group row">
<div class="col-sm-6">
{{ Form::text('name', null, array('class' => 'form-control', 'required' => '', 'maxlength' => '255', 'placeholder'=>'Nom complet')) }}
</div>
<div class="col-sm-6">
{{ Form::text('phone', null, array('class' => 'form-control', 'required' => '', 'maxlength' => '255', 'placeholder'=>'Téléphone portable')) }}
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
{{ Form::textarea('adress', null, array('class' => 'form-control', 'required' => '', 'placeholder' => 'Adresse (Rue)')) }}
</div>
<div class="col-sm-6">
{{ Form::text('cp', null, array('class' => 'form-control', 'required' => '', 'maxlength' => '255', 'placeholder'=>'Code postal')) }}<br>
{{ Form::text('town', null, array('class' => 'form-control', 'required' => '', 'maxlength' => '255', 'placeholder'=>'Ville')) }}<hr>
{{ Form::text('start_time', null, array('class' => 'form-control', 'required' => '', 'placeholder'=>"Date d'entrée")) }}
</div>
</div>
<div class="col-sm-12">
{{ Form::textarea('special', null, array('class' => 'form-control', 'required' => '', 'placeholder' => 'Demande spécial ou commentaire')) }}
</div>
</div>
{{ Form::submit('Envoyer', array('class' => 'btn btn-success btn-lg', 'style' => 'margin-top: 20px;')) }}
{!! Form::close() !!}
</div>
</div>
</div>
</div>
</div>
<!-- SECTION CONTENT END -->
</div>
<script>
$('input[name="start_time"]').daterangepicker();
</script>
{!!Form::open(数组('route'=>'reserver.store'))
{{Form::text('name',null,array('class'=>'Form control','required'=>'','maxlength'=>'255','placeholder'=>'Nom complett'))}
{Form::text('phone',null,array('class'=>'表单控件','required'=>'','maxlength'=>'255','placeholder'=>'Téléphone portable'))}
{Form::textarea('address',null,array('class'=>'表单控件','required'=>'','placeholder'=>'adrese(Rue)'))}
{Form::text('cp',null,array('class'=>'表单控件','required'=>'','maxlength'=>'255','placeholder'=>'邮政编码'))}
{Form::text('town',null,array('class'=>'表单控件','required'=>'','maxlength'=>'255','placeholder'=>'Ville'))}
{Form::text('start_time',null,array('class'=>'表单控件','required'=>'','placeholder'=>“日期输入”))}
{Form::textarea('special',null,array('class'=>'Form control','required'=>'','placeholder'=>'Demande spécial ou commentaire'))}
{Form::submit('Envoyer',array('class'=>'btn btn success btn lg','style'=>'页边顶部:20px;'))}
{!!Form::close()!!}
$('input[name=“start_time”]”)。daterangepicker();
我已经在数据库中创建了一个记录,我想知道如何在daterangepicker上禁用数据库中记录的日期
我的控制器实际上只是显示页面,还没有编写任何方法
有人可以解释我如何做到这一点?您应该查看daterangepicker扩展文档。如何从daterangepicker禁用特定日期。这与拉威尔无关。