Bug 511481

Summary: PDF Form Inputfield for date shows no hint for invalid date
Product: [Applications] okular Reporter: andreaswuest
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: wishlist    
Priority: NOR    
Version First Reported In: 25.04.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: PDF with the form showing the problem.

Description andreaswuest 2025-11-01 20:15:31 UTC
Created attachment 186399 [details]
PDF with the form showing the problem.

Hi,

the form contains input fields for dates labeled Datum von / Datum bis (on the right hand side). If you enter an invalid date (format) - and you leave the input field with tab - the invalid input disappears.
It would be nicer if okular would at least show the expected format in some way, so the user knows how to enter the date format. The pdf.js viewer in firefox shows the following message, if you enter an invalid date: 

"Invalid date / time: please ensure that the date / time exists. Field [ datum.bis ] should match format dd.mm.yyyy"

STEPS TO REPRODUCE
1. Open attached pdf with okular
2. populate either Datum von or Datum bis with some invalid date (e.g. only characters, no numbers)
3. If you leave the input field with tab or mouse the invalid input values disappear.

OBSERVED RESULT
Invalid input field values disappear after input fields loses the focus.

EXPECTED RESULT
If the input field value in not correct, show an warning / info message, that helps the user the populate the input field (just like pdf.js in Firefox does).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Frameworks Version: 6.14
Qt Version: 6.9.1