Set Type=numbers in TextBox properties.
To limit the number of characters to 2:
TextBox On Text Changed -> TextBox Set text to left(self.Text, 2)
Also, see Tutorials section, there are lots of helpful examples on how to customize texboxes:
https://www.scirra.com/tutorials/all