Chronological order on X-Men movies.
As for the tv-shows Gifted and Legion, they take place on their on "timeline/universe" and are not connected to the main movies.
8000 B.C - Apocalypse is born as the wolrd's first mutant.
3000 B.C - Apocalypse made the pyramids in Ancient Egypt
1832 - Wolverine was born (X-Men Origins: Wolverine)
1861-1865 - James Howlett and Victor Creed fight in Civil War (X-MO:W)
1917-1918 - WWI (X-MO:W)
1944 - Erik Lehnsherr is taken to Auschwitz
1962 - X-Men First Class (Cuban Missile Crisis)
1969-1971 - James & Victor fight in Vietnam (X-MO:W)
1972 - Logan quits Team X
1973 - Is where Wolverine was sent in Days of Future Past
(So, that's when things get a bit messy)
1973, January 27
- Mystique assassinates Bolivar Trask in Paris.
- Trask Industries unveils the Sentinels Program.
- Sentinel: Mark I are created. Between 1973 and 1996, Trask Industries produces 8,732 Mark I Sentinels for the governments of the United States, China, Russia, Israel, Saudi Arabia, France, India and the United Kingdom.
- Erik Lehnsherr is publicly revealed as having participated in the John F. Kennedy assassination 10 years previously.
1979 - The Rest of XMO:W (leading up to the Three Mile Island Accident)
March 28 - Logan loses his memory
1986 - Charles Xavier and Erik Lehnsherr visit Jean Grey. (XM:TLS)
1996 - Young Angel cuts off his wings (XM:TLS)
2003 - Rest of X-Men (X-Men, X2: X-Men United: The Movie Prequel: Wolverine, X2: X-Men United: The Movie Prequel: Nightcrawler, X2: X-Men United).
2005 - X-Men: The Official Game (So yeah, the video game is also connected with the movies)
2006 - X-Men: The Last Stand
2011 - Angel is killed by Sentinels during an Occupy Wall Street march on the X-Mansio (X-M:DoFP)
2013 - The Wolverien
2015 - Professor X and Magneto meet Wolverine at an airport.
- Beast is killed by Human Majority protesters. (X-M:FC)
2018 - Dr. Gregory D. Burnett revolutionizes a method of growing synthetic stem cells
-The X-Men send Wolverine back in time to stop Mystique from killing Bolivar Trask.
-The remnants of the X-Men and Free Mutants are massacred in China
-Logan successfully manages to prevent Trask's assassination in 1973 and indirectly changes history itself, erasing the original timeline from existence. (so the previous movies never happend)
1973, January 27
-Wolverine from the alternate future awakens in his younger body.
-The X-Men prevent Mystique from killing Bolivar Trask in Paris.
-Trask Industries unveils the Sentinels Program.
-Mystique spares Bolivar Trask at the White House.
-The Sentinels Program is cancelled. Bolivar Trask is arrested for selling military secrets.
-Mystique, under the guise of William Stryker, raises Logan from the Potomac River.
-Adamantium is injected into Logan's skeletal system.
-Wade uses Cable's time travel device to travel back in time to the to kill Weapon XI, before his fight with Wolverine.(Deadpool 2)
1983 - Apocalypse resurfaces X-Men Apocalypse
-Chernobyl disaster causes many babies born to develop mutations.
-Colossus is born
1992 - Dark Phoenix
-The last generation of natural Mutants are born due to Transigen and Alkali putting mutant-suppressing chemicals in the products used in mass food production.
-Firefist is born
2010 - The Weapon X program is reopening by a secret govermnet agency, it begin creating mutants through brutal and sadistic methods, to sell off to the highest bidder
2014 - Wade Wilson stops a stalker of a teenage girl. Later at a bar he meets Vanessa Carlysle and they begin a relationship*(Deadpool)*
2015 - Wade Wilson and Vanessa Carlysle get engaged and Wade finds out that he has a terminal cancer.(Deadpool)
2016 - Deadpool, with a help of Colossus and Negasonic Teenage Warhead, defeats Ajax.(Deadpool)
2017 - Wade begins traveling around the world doing mercenary work, killing gangsters, murderers and other bad guys. (Deadpool)
2018 - Deadpool 2
2023 - The ending of DoFP (The future Wolverine wakes up form his time traveling adventures and finds that Jean Gray and Cyclops are alive. Future Xavier helps Wolverine to catch up what he missed out on since 1973.
2028 - Xavier suffers a psychic sezure that injures over 600 people along with killing several members of X-Men
2029 - Logan
2068 - Cable’s decides to travel back in time and kill Firefist before he makes his first kill in 2018