There isn't really any set number of grace days that you have to transfer to another employer.
The key thing about a transfer is that the USCIS needs to believe that you are still working at the old employer at the time when the transfer petition is submitted because you need to be in legal status in order to transfer or change status. There are a couple of factors that influence whether you can do the transfer.
1. if your old employer tells USCIS that you are no longer working for them, then you H1 is invalid and you are not able to transfer it. In fact you had better leave the US very quickly if this happens since you will be out of status.
2. you will have to provide a recent pay stub to USCIS when you try to transfer the H1, if the stub isn't within about 1 month of the petition date, USCIS probably won't consider it recent and will question whether you are still employed with the old employer. This means that they will think you are out of status and thus unable to transfer or change status.
If your job hunt isn't looking promising, you might want to switch to a B-1 visitor visa so that you can stay in legal status. However, given that H1-Bs are so backlogged, it might be very hard to switch back to H1 even if you do find a job.
If you do find a job quickly, one of the nice things about an H1 transfer is that you can start working at the new employer the day after USCIS receives your I-129 petition. You do not have to wait for it to be approved.