WebSite X5Help Center

 
Thomas H.
Thomas H.
User

Set default date to todays date in the date picker  en

Автор: Thomas H.
Просмотрено 996, Подписчики 2, Размещенный 0  

Hello,

I am creating a contact form and would like to know if there is a way to set the default date, in the date picker, to todays date, instead of having the user manually select it?

Размещено
8 Ответы
Aleksej H.
Aleksej H.
Moderator

Hello. As far as I know, this is currently not possible.

Читать больше
Размещено От Aleksej H.
Incomedia
Elisa B.
Incomedia

Hi Thomas, 

I set this message as Idea and reported it. 

Thanks! Kind regards.

Читать больше
Размещено От Elisa B.
Axel  
Axel  
User
Лучший пользователь месяца FR

Probably possible by Javascript script.

Читать больше
Размещено От Axel  
Axel  
Axel  
User
Лучший пользователь месяца FR

@KolAsim

Any idea... Jquery ? 

Читать больше
Размещено От Axel  
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Axel  
@KolAsim Any idea... Jquery ? 

...x >>>>  #imObjectForm_1_2

<script>
var dataK = new Date();//K>
var giornoK = dataK.getDate();if(giornoK < 10 ) { giornoK="0"+giornoK};
var meseK = dataK.getMonth()+1;if(meseK < 10 ) { meseK="0"+meseK};
var annoK= dataK.getFullYear();var OggiK = giornoK+"/"+meseK+"/"+annoK;
$("#imObjectForm_1_2").val(OggiK) //K<<
</script>

.

ciao

.

Читать больше
Размещено От  ‪ KolAsim ‪ ‪
Thomas H.
Thomas H.
User
Автор

Where would I need to insert the script to make that work?

Читать больше
Размещено От Thomas H.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... if the page is not heavy, usually at the bottom of the page, at the end of the BODY tag ...
... if you have difficulty, to continue, post the LINK of your page with your form_mail ...

.

Читать больше
Размещено От  ‪ KolAsim ‪ ‪
Thomas H.
Thomas H.
User
Автор

Perfect! Thank you so much! 

Читать больше
Размещено От Thomas H.