Open Closed

Razor asp-input time - how to use 24h settings? #3650


User avatar
0
dlapointe created
  • ABP Framework version: v6.0.0-rc.3
  • UI type: MVC
  • DB provider: EF Core MySql
  • Tiered (MVC) or Identity Server Separated (Angular): no (openiddiect

Hi all,

Im trying to use the abp-input type="time" to be a 24h format ( no am / pm selector). Ive tryed mostly everything i could think of in the asp-format params but without success <abp-input asp-for="Technician.StartAt" type="time" asp-format="HH:mm"/>.

Ive also tried to change the settings in js as i was expecting it to use either Jquery or Bootstrap TimeSelector but without success again.

How can we force the abp-input to show as a 24h format?

Also, it seems there is no docmentation at all on the abp-input, abp-modal etc at all? Or did i miss something? The scaffolded pages uses it but i cant believe there aint no docs at all?

Thank you


5 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi dlapointe

    Firstly, which theme are you using in your project?


    I've checked with LeptonX and it doesn't provide any time picker right now. There is a native input shown when you use type="time". So it depends on operation system of user.

    For example, I've switched to 24H system in my computer and I see it in 24H but if any user uses 12H system, will see 12H picker.

    If you don't prefer this logic, you can choose one of the timepicker library and use it in your application.

  • User Avatar
    0
    dlapointe created

    Hi,

    Thanks for the feedback. I am using LeptonX so it would be the native input then! Ill try to switch my computer to 24h format and confirm with the business if that trick would be good enough :D otherwise we will just change the control.

    Thank you

  • User Avatar
    0
    dlapointe created

    Just one more question regarding MVC / Razor component : is there any docs at all? all those <abp-input>, <abp-form> etc are not documented at all on the main documentation pages but maybe somewhere else?

    Thank you

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    You can find documentation of all tag helpers from here: https://docs.abp.io/en/abp/latest/UI/AspNetCore/Tag-Helpers/Index

    You can visit Form Elements section for abp-input https://docs.abp.io/en/abp/latest/UI/AspNetCore/Tag-Helpers/Form-elements

  • User Avatar
    0
    dlapointe created

    Oh my bad! I was sure that i did look?!

    Sorry about it!

    Have a good day

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09