I understand that @ptrblck has solutions to your technical problem in this thread.  I wanted to ask you though:  why do you think shuffling the temporal dimension is a viable thing to do?  Do you assume that the instances are independent along the time dimension?  If not, then shuffling is absolutely not the thing to do!
If your model has time dependence, then you do not want your model learning the past from the future.  You need to take care in only training the model on timesteps that occur before the test data (in time).  You could think of this similarly to text encoding, wherein you mask later words in a sentence because you don’t want later words to affect which words to predict next.
Does this make sense?  (although if your data/model are time independent, disregard this entire post)