Welcome to the Support Communities!
The article below may be able to help you with this.
Click on the link to see more details and screenshots.
If you see one of following alerts, you need to erase the device:
"iTunes could not connect to the [device] because it is locked with a passcode. You must enter your passcode on the [device] before it can be used with iTunes."
"You haven't chosen to have [device] trust this computer"
If you have Find My iPhone enabled, you can use Remote Wipe to erase the contents of your device. If you have been using iCloud to back up, you may be able to restore the most recent backup to reset the passcode after the device has been erased.
Alternatively, place the device in recovery mode and restore it to erase the device:
- Disconnect the USB cable from the device, but leave the other end of the cable connected to your computer's USB port.
- Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to shut down.
- While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on.
- Continue holding the Home button until you see the Connect to iTunes screen.
- iTunes will alert you that it has detected a device in recovery mode. Click OK, and then restore the device.
I updated ios7 on my iPad mini and was stuck with passcode for I didn't have any prior to ios7. After few attempts ( and I was aware that the device would be disabled after couple of attempts!!), I used the default passcode of 1234. Bravo..it worked..I was able to unlock my iPad mini and use it as always.
Since I didn't need the passcode for this device (and again this is optional), I went to Settings > General > Passcode > (Entered 1234) > Turn Passcode Off. And the passcode was turned off.
Fortunaltely, it worked for me and I didn't lose any data nor I had to reset/ recover my iPad with iTunes.