Skip to content

Commit b2143de

Browse files
Add clockpicker component and bugfix
1 parent cb7d958 commit b2143de

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

Diff for: app/Console/Commands/stubs/make/webpack.mix.stub

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ mix.extract([
2020
'axios',
2121
'bootstrap-datepicker',
2222
'bootstrap-sass',
23+
'clockpicker/dist/bootstrap-clockpicker',
2324
'icheck',
2425
'jquery',
2526
'jquery-slimscroll',

Diff for: readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ npm install
9797

9898
Install Inspinia needed package from npm
9999
```bash
100-
npm install --save-dev animate.css bootstrap-sass bootstrap-datepicker font-awesome icheck jquery-slimscroll metismenu moment pace-js select2 select2-bootstrap-theme toastr
100+
npm install --save-dev animate.css bootstrap-sass bootstrap-datepicker clockpicker font-awesome icheck jquery-slimscroll metismenu moment pace-js select2 select2-bootstrap-theme toastr
101101
```
102102

103103
Run Laravel Mix command

Diff for: resources/assets/js/inspinia.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ try {
1919
require('bootstrap-datepicker');
2020

2121
// clockpicker
22-
require('clockpicker');
22+
require('clockpicker/dist/bootstrap-clockpicker');
2323

2424
// select2
2525
require('select2');

Diff for: resources/views/components/fields/datepicker.blade.php

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
<div class="form-group{{ $errors->has($field['name']) ? ' has-error' : '' }}">
22
<label class="control-label">{{ !empty($field['label']) ? $field['label'] : title_case(str_replace('_', ' ', snake_case($field['name']))) }}{{ !empty($field['required']) ? '*' : '' }}</label>
3-
<div class="input-group date" data-date-format="yyyy-mm-dd" data-date-z-index-offset="1001">
3+
<div class="input-group">
44
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
5-
<input type="text" class="form-control" name="{{ $field['name'] }}" value="{{ old($field['name'], isset($model) ? $model->{$field['name']} : null) }}"{{ !empty($field['required']) ? 'required' : '' }}>
5+
<input type="text"
6+
class="form-control js-datepicker"
7+
name="{{ $field['name'] }}"
8+
value="{{ old($field['name'], isset($model) ? $model->{$field['name']} : null) }}"{{ !empty($field['required']) ? 'required' : '' }}
9+
data-date-format="yyyy-mm-dd"
10+
data-date-z-index-offset="1001"
11+
>
612
</div>
713
@if ($errors->has($field['name']))
814
<span class="help-block">{{ $errors->first($field['name']) }}</span>

Diff for: webpack.mix.js

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ let mix = require('laravel-mix');
3232
'axios',
3333
'bootstrap-datepicker',
3434
'bootstrap-sass',
35+
'clockpicker/dist/bootstrap-clockpicker',
3536
'icheck',
3637
'jquery',
3738
'jquery-slimscroll',

0 commit comments

Comments
 (0)