The maximum voltage that can be applied to the inputs of the comparator TLV1805Q1?
The inputs must remain (almost) within the supply rails. 

It is permissible to supply 2.5V to one input if the positive supply rail is greater than or equal to 2.2V.  If that supply rail can at any time be less than 2.2V (maybe the power rail has not yet come up to voltage) then you must include a series current-limiting resistor as described in note 2. 

This is a common pitfall for young players where an input is supplied by a function generator or other separately supplied source, and the device can be destroyed as a result. 

There is no limitation on the differential voltage, provided both inputs remain (almost) within the supply rails. 

The above refers to what may cause damage to the device. As far as proper operation goes, this particular part is very accomodating, it will work provided the inputs are within 200mV of the supply range, so with +/-12V supply as long as both inputs are within the range of -12.2 to +12.2 it will function (it may also function with only one input outside the range, I didn't evaluate that condition).  

To summarize, your circuit will work, but be careful about applying voltage to the inputs without power on the chip- if in doubt add a 2K series resistor to limit the current to 10mA maximum.