Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

aktuelle Uhrzeit per Klick einfügen

New Here ,
Apr 29, 2023 Apr 29, 2023

Hallo,

Wie kann ich ein Feld so programmieren/einstellen, dass per Mausklick die aktelle Uhrzeit eingetragen wird?
--> JavaSckipt?

-->andere Optionen

 

Wenn die Uhrzeit einmal eingetragen ist, sollte diese nur noch manuell bearbeitbar sein.. Das heißt: wenn ich erneut reinklicke darf es nicht mehr automatisch aktualisiert werden .

Markus

TOPICS
JavaScript
713
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 29, 2023 Apr 29, 2023
LATEST

Yes, a script is the only way to do it.

You can use the following code as the field's On Focus event:

if (event.target.valueAsString=="") event.target.value = util.printd("HH:MM", new Date());

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines