It took around 2 months for my son to quit wearing diapers. In the first month, I didn't let him wear diapers or underpants at home, even at night. However, he still wore diapers for outings. Although he sometimes leaked wee wee without prior notice at home, the frequency was getting lower and lower.
In the second month, I helped him quit diapers even for outings. At the same time, I let him wear underpants. Problems came! I guess he couldn't figure out the difference between diapers and underpants. He might think they were the same. He frequently leaked wee wee! Hopefully, this didn't last too long...just a couple of weeks. After these two months of training, he quited diapers successfully. I hope my experience can help you somehow.