Datepicker, how to initialized the date

Hi all,

I need to initialized two datepickers with start date=today and end date=today+5 days.

  1. I added a “Date and Time” component to my App:
    image
  2. i try to initiate the From Date date picker with the current date:
    image
    image
  3. The field remains uninitialized
    image
  4. But if i have a look to the html code in the browser i can see the rigth date value:

what’s wrong ?

obviously i cannot initialize the second field “date To”.

You should not apply the formatter for the dynamic date value.

It does not work better if i do not format.


First : i’m not shure i have understand how “date and time” component works. How is it initialized ? shoudl i do it ?
Second : should i use a specific date format ?

The question is, what are you trying to achieve exactly?
The following tutorial explains how to use the current date and time (datetime variable):

Thank’s Teodor, it seems that i use it on the rigth way.
What do i want to achieve ?
I have a bootstrap table with a list of records (travels which traveller name and travel date).
Each record have a date.
I want to filter the table with all record with travel date greater or equal than FromDate (DU on the screenshot) and lower or equal than the ToDate (AU on the screenshot).
the two dates fields remains empty or with jj/mm/aaa when i initialize the date.
On the screenshot you can see DU (from) field which is a date picker and the AU (to) field which is a simple date input. In both case i do not achieve to have the current date in it.

You should not have to set the datepicker to current date. It should be set to current date by default. Make sure your input is a text field NOT a date field.