Select button on an airlines site

I came across a select button while booking a flight. It was a simple select button that behaved more like a toggle button. Upon clicking the select button it swapped it with another button that showed the button is selected with a cross icon next to it to close it. Is this a right way to display?enter image description here

enter image description here