Datepicker bug

PLEASE DELETE THE BUG TEMPLATE DUMMY TEXT BEFORE POSTING THE TOPIC!

Thanks for reporting an issue! Spend 60 seconds reading this...

  1. Before reporting, make sure you have the latest version of Wappler.
  2. Make sure you have searched the forum first for similar issues being reported
  3. If it is a general web related issue - do a Google Search first
  4. Issue tracker is only for bugs and feature requests, in English only.
  5. Learn how to report bugs effectively

======== TEMPLATE BUG FORM ========

Wappler Version :
Operating System :
Server Model:
Database Type:
Hosting Type:

Expected behavior

What do you think should happen?

...YOUR TEXT HERE ...

Actual behavior

What actually happens?

...YOUR TEXT HERE ...
Datepicker has a bug when Min Date assigned f.e. Today -weeks names shown in calendar don’t much dates

How to reproduce

  • Detail a step by step guide to reproduce the issue
  • A screenshot or short video indicating the problem
  • A copy of your code would help. Include: JS, HTML.
  • Test your steps on a clean page to see if you still have an issue

...YOUR TEXT HERE ...

PLEASE DELETE THE BUG TEMPLATE DUMMY TEXT BEFORE POSTING THE TOPIC!

They are going to need a lot more information than that. This really doesn't tell us what the problem you are facing is.

Perhaps some screenshots or something would help.

Screenshot 2024-12-08 at 15.33.09

Two things I can see right off the bat. What do you have set in the Format field in the datepicker settings. And your date picker should be applied to a text field not a date field.

by clicking on min date field in the calendar dates I selected 6 of December while current date was 8 and you can see that 6 must be Friday and 7 as Sat. But as shown in screenshot 6 is Sun and 7 is Mon

Yes, please correct the things I mentioned above.

Input text as text not a date

Yes input field as text and format field
accordingly

And what happens? Maybe supply your code for the input here.

I can send in half hour but you can very easy check if you will assign today in min date and check if it much weeks name

Works fine for me. Where are you assigning the min date? In the date picker properties or the dynamic attributes? Make sure the date formats match as well.

Not in the dynamic . Do you use moment formatter?

Use the dynamic attribute --> Date Picker ---> Min Date.

It will be easier to help once we see the code you are using. :slight_smile:

Can you send me your screenshot for today as mindate . Maybe I will find by myself problem


Screenshot 2024-12-11 at 22.36.38

You are using mixed formatting for your dates. Change format="DD-MM-YY" to match the rest of your formatting. format="YYYY-MM-DD"

You will see it works as it should in my demo.

https://sandbox.lawryk.ca/


Screenshot 2024-12-11 at 23.11.07
Not solved

Replace your input code with this and go from there. You have some really wonky code happening there.

<input type="text" class="form-control form-control-sm" id="date1" name="date1" aria-describedby="input1_help" is="dmx-date-picker" format="YYYY-MM-DD" dmx-bind:mindate="current_date.datetime" dmx-bind:maxdate="current_date.datetime.addDays(15)">

What is dmx-bind:value="date.value.formatDate('yyyy-MM-dd')" suppose to do in your code?

nothing changed after replacing. date.value.formatDate('yyyy-MM-dd')" is to show by default current date in input

and it is interesting why max date works correctly regardless of various date formatting .