-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Description
Describe the bug
Date time picker readonly fields can still be changed and saved.
To Reproduce
Steps to reproduce the behavior:
- Add a Date Time Picker field
- Set it to
readonlywhatever the way - Click on the field, datepicker shows (jquery ui component)
- Change the date
- Save
- You have been able to change and save a readonly field :/
Expected behavior
Honor readonly field attribute, even when a JS widget enhances it.
Screenshots or Video
Enregistrement.de.l.ecran.2025-09-19.a.11.44.45.mov
Code
Please drag and drop an export of your field group, option page, custom post type or taxonomy JSON here.
If your issue relates to ACF Blocks, please also provide a reproducable code example of your ACF Block including it's block.json so we can reproduce the issue.
Version Information:
- WordPress Version 6.8.2
- PHP Version 7.4
- ACF Version Pro 6.5.1
- Browser Chrome 140
Additional context
I would have kindly debugged that and submitted a Pull Request for this if only you provided the unminified version of your assets 🙄 (Ping #938).
BTW, this is an easy fix:
// In date picker initialize
beforeShow: function(input) {
if ($(input).attr('readonly') || ) {
return false;
}
}Metadata
Metadata
Assignees
Labels
No labels