Date visualization on date picker

Hello all,

I am trying to display the date in the date picker (date and time) and the format in the visualization format is not the one that is on the date picker.

DD-MM-YYYY hh:mi:ss


on the picker in the time section there is a mix in the date between my format and the english format and the time is in AM/PM instead of the 24H.

I also get the Date plugin and set the same format for the default format.

Any ideas ?

Thanks
Alex

Double check your format string:

  • mi is not a correct value
  • hh is hours from 00 to 12, You may want to use HH for 0-24 hours

Even with the correct format string it seems that is not working properly when “select also time” is on.

@aurelie
From a quick look at the code it seems that this is because of the way “visualisation format” (mask) is passed in the masks prop. ww-date-time-picker/wwElement.vue at 5d51ffdd14f82eb60b99ecbddef4a5b74710b27d · weweb-assets/ww-date-time-picker · GitHub
It seems to set only the input mask that is applied when the mode is date. Format & Parse Dates | V-Calendar
A solution can be to pass the same value also to inputDateTime and inputTime masks.

       masks() {
			return {
				input: this.content.mask,
				inputDateTime: this.content.mask,
				inputTime: this.content.mask,
			};
		},

I hope this can help.

1 Like

Hey @dorilama thanks for taking time to take a look, I will try to add this to our roadmap updates !
(even when dev is quick, we still have all the test process)

2 Likes

Hi aurelie

any news on that only time time picking Issue ?

Best Regards
Frank

This is currently under QA in our side, should be push soon :slight_smile:

1 Like

Hi @Fritters,

The fix is in production, your configured format should apply correctly with datetime and time only mode. Be aware the AM/PM selector will still show up even you choose to display a 24h format.

1 Like