To make these date-filled cookies gluten-free, substitute the all-purpose flour with a 1:1 gluten-free flour blend that includes xanthan gum for proper structure. Additionally, ensure the rolled oats are certified gluten-free to avoid any cross-contamination. The remaining ingredients remain unchanged, preserving the taste and texture of the cookies.