The Batley and Spen by-election will be held on 1 July, it has been confirmed.
It was triggered after the previous MP Tracy Brabin had to stand down when she was elected as
West Yorkshire's mayor.
Labour has selected Kim Leadbeater, sister of Jo Cox, who represented the seat before her murder by a right-wing extremist, as the party's candidate.
The Conservatives have selected Ryan Stephenson, a Leeds councillor, as their candidate.
Ms Brabin held Batley and Spen for Labour with a reduced majority in the general election of 2019 - down to 3,525 from 8,961 in 2017.
The Conservative Party's candidate came second.
The Yorkshire Party, which came third in the West Yorkshire mayoral contest, has confirmed its candidate in the by-election will be Corey Robinson, who is a senior medical research engineer.