Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

186
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

0

<input id='calendar-input' />

The above didn't work for me. try

<input type="date"/>
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda