Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

287
Views
Laravel mix issue: datepicker does not work

The datepicker works on my bootstrap folder. However, when I move everything into laravel, it does not work. I don't really understand that how css and js work in laravel, so that is why I am here :).

/resources/sass/app.scss

//css
@import url('https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');

//js
@import url('https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js');
@import url('https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js');
@import url('https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js');

              <!--DatePicker-->
              <div class="col-md-4">
                <h4 class="">Prefer Date</h3>
                <form>
                    <div class="">
                        <!-- <label for="date" class="col-sm-1 col-form-label">Date</label> -->
                        <div class="">
                            <div class="input-group date" id="datepicker">
                                <input type="text" class="form-control">
                                <span class="input-group-append">
                                    <span class="input-group-text bg-white">
                                        <i class="fa fa-calendar"></i>
                                    </span>
                                </span>
                            </div>
                        </div>
                    </div>
                </form>
              </div>
              <script type="text/javascript">
                $(function() {
                    $('#datepicker').datepicker();
              });
              </script>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I just copied your code and it worked if you swap this:

<input type="date" class="form-control">

So change the input type from text to date, since it is a Datepicker you are trying to build.

I recently had a similar issue and that is my code for my date picker:

<div class="flex flex-wrap -mx-3 mb-6">
    <div class="w-full px-3">
         <label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2 text-base" for="enddate"> Enddatum </label>
         <input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 mb-3 leading-tight id="enddate" name="enddate" type="date" placeholder="Enddatum">
    </div>
</div>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!