Home > Blockchain >  Put time format in a Xamarin Forms input
Put time format in a Xamarin Forms input

Time:12-22

How about I would like to know how I can put a type of time format in an entry example 12:00 that when filling it there are the colons: that separate the hours from the minutes

I looked at some type of masks for the entrance but none adapted to what I want

CodePudding user response:

If are able to use the Xamarin CommunityToolkit, you could use a MaskedBehavior. In your case it would be something like this:

<Entry>
    <Entry.Behaviors>
        <xct:MaskedBehavior 
            Mask="xx:xx" 
            UnMaskedCharacter="x"/>
    </Entry.Behaviors>
</Entry>
  • Related