On 22 February 2016, the team filmed "Sau Aasmaan" in Krabi, Thailand, for a week. Filming then continued in Delhi and Mumbai from November 2015 onwards. Principal photography began on 28 August 2015, in Glasgow, Scotland, and went for over a month.
The film was initially titled Kal Jisne Dekha. Later in April 2015, Katrina Kaif was confirmed to feature in the film, opposite Malhotra. In September 2014, it was officially announced that the film will be co-produced by Karan Johar of Dharma Productions and that Sidharth Malhotra will feature in the film.
Anushka Sharma was also offered the female lead but she turned it down as well. Aamir Khan and Deepika Padukone were initially attached, but both eventually left the project. In October 2013, it was announced that Nitya Mehra, assistant director to films Life of Pi and The Reluctant Fundamentalist, would be making her directorial debut with Excel Entertainment on their new project. Sanjana Sanghi as a student in Jai's classroom.Sagar Arya as Nikhil Khanna, Diya's second husband in the flash-forward.Ram Kapoor as Vinod Kapoor, Diya's father.Rajit Kapur as Panditji (special appearance).The film ends with them marrying and everyone dancing. Jai reconciles with Diya and promises to be true to her. Jai rushes back to Diya, cherishing every moment along the way, also glad to see his mother again. Jai wakes up back into the present, the day after he argued with Diya about his life and his career, got drunk, and began the long mental voyage into his future while possibly asleep. At the end of the day, Jai is a happy man. He spends time with his children, does his work well and makes Diya feel special, and attends her art exhibition. Jai is given another opportunity to set things right as he goes back in 2023 on time to the same day, seven years after his marriage. Reeling from this blow, Jai comes across the priest who had conducted his marriage, who warns him of the importance of time. After the funeral, Jai is shocked that he and Diya are still divorced and that Diya had married art gallery owner Nikhil Khanna (Sagar Arya), her show opener, who enjoyed the love of Jai's mother and children. He finds out that his mother had died and everyone gathered for her funeral. The next day, in 2047, he wakes up to find himself in his 60-year-old self. Jai is however convinced that he has set things right. Believing it to be the cause of his divorce, Jai hastily returns home, but his family is unhappy with him. However Jai gives more priority to work and instead of going to Diya's first art exhibition, he goes to his friend Chitra's ( Sayani Gupta) place to help her with her breakup. He juggles many priorities of his family and career. Jai wakes up the next day, in 2023, realizing he is in the past, seven years after his marriage. Heartbroken, he returns home and pleads to return to the past to set things right. To his horror, Jai realizes that it is the day when he and Diya are divorced. It has been eighteen years since his marriage.
Next time, in 2034, he wakes up, he is a professor at Cambridge University, his dream job. He realizes he has been time travelling and has no control over it. He discovers that it has been two years since his marriage. Next up, in 2018, he wakes up in Cambridge, only to find his wife about to deliver their child. He discovers that it's been ten days since he married Diya. Jai gets drunk and passes out only to wake up in Thailand on his honeymoon. He tells Diya that he has other plans for his bright future and she may not be a part of it. Jai criticizes these meaningless rituals and talks negatively about his marriage. Jai reluctantly agrees to marry her but changes his mind because of the thought of the seven vows and the billion rituals, as well as the fear of divorce. While Jai hopes to get a fellowship at Cambridge University, Diya wishes to marry her long-term boyfriend. Jai is a mathematics professor and Diya, an artist. Jai Verma ( Sidharth Malhotra) and Diya Kapoor ( Katrina Kaif) are childhood sweethearts.