One of the eligibility requirements for the child and dependent care credit states that the childcare must be provided so you (and your spouse if filing jointly) could work or look for work. However, if your spouse did not have a job and had no earned income, you still may take the credit if he or she was a full-time student or disabled.
Per IRS Instructions for Form 2441 Child and Dependent Care Expenses, page 4:
Line 5 - If You or Your Spouse Was a Student or Disabled.
Your spouse's earned income. Your spouse was a full-time student if he or she was enrolled as a full-time student at a school for some part of each of 5 calendar months during 2017. The months need not be consecutive. A school does not include an on-the-job training course, correspondence school, or a school offering courses only through the Internet. Your spouse was disabled if he or she was not physically or mentally capable of self-care. Figure your spouse's earned income on a monthly basis.
For each month or part of a month your spouse was a student or was disabled, he or she is considered to have worked and earned income. His or her earned income for each month is considered to be at least $250 ($500 if more than one qualifying person was cared for in 2017). If your spouse also worked during that month, use the higher of $250 (or $500) or his or her actual earned income for that month. If, in the same month, both you and your spouse were either students or disabled, only one of you can be treated as having earned income in that month under these rules.
For any month that your spouse was not a student or disabled, use your spouse's actual earned income if he or she worked during the month.
To enter these amounts in TaxAct®: