At this time, being able to add a service From and To date range on an invoice template isn't available in QuickBooks Online. The service date that you can select is on the day that the product/service was purchased or made.
To indicate the date range of your sales transaction, you may enter them on the description box. Please see the screenshot attached for reference:
Having the option to add the duration of the service date in the invoice template is a great idea. I'll share thispreference to our developers, so they can assess the suggestion and put it under consideration.