Timepicker can be set to have 12 or 24 hrs format. When set to one format, the keyboard input can only accept that format as well and will throw an error when a user trying to enter via the other format.
Suggest to only set the Display format, and allow the keyboard input to accept both (both 12 and 24 hours format); as we cannot guarantee all the users will prefer to enter time in the same format.
I am trying to imagine how this could work - I guess it would mean that for 12h format we need to type also am/pm which is fine because even for 'always show 12h format' you need to somehow distinguish between am and pm.
Pros
No need for setting in preferences
Flexibility - great for environment where people do need two formats for some reason
Cons
Someone can accidentally skip am/pm and result in some unintentional reformatting or 12h time shift for the event
Possible to mix entries with 12 and 24 h format - that is potentially confusing
Needs to be user-tested to avoid possible misunderstanding (technically, anything new should be user-tested)