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

184
Views
Selected current date in form Full Calendar

Don't have any idea when my app start in date form to be put the current date.I have a function when a day is clicked to be put in form, but how to do automatically, without clicking on it to be put there?

   $('#calendar').fullCalendar({
    sclable: true,
    height: 355,
    contentHeight: 355,
    header: {
        right: 'details, today, prev,next',
    },
    dayClick: function (date) {
        var datePicker = date.format('MM/DD/YYYY');
        if (!dateToday) {
            $('#form_date').val(datePicker);
        }
about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

What you are asking for has more to do with HTML than with full-calendar.

You can achieve this by setting value attribute of your <input /> tag.

<input id='calendar-input' />

There are two ways to get the seed value for your input field within your javascript code.

1.If you are using moment.js, which is recommended with full-calendar, you can do something like this:

 const today = moment().format(#formatType);
    document.getElementById("calendar-input").value = today;

2.If you want to use full-calendar's standard way of getting current date and set it accordingly, in which case it will work for both initial and subsequent selection use getDate method. The method returns current date of the calendar and you can set it exactly like above instead of creating a new moment date object.

about 4 years ago · Santiago Trujillo Report

0

<input id='calendar-input' />

The above didn't work for me. try

<input type="date"/>
about 4 years ago · Santiago Trujillo 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!