Code Monkey home page Code Monkey logo

Comments (8)

juanguerra97 avatar juanguerra97 commented on July 23, 2024 1

Yeah I just said it for consistency with older versions. I don't know in which version this was broken but that is how it used to work.

from primeng.

RogueTea avatar RogueTea commented on July 23, 2024

I think another possible solution could be to check the hour format. So the logic could include if hourformat is 12 or 24. I'll have a look into this.

from primeng.

RogueTea avatar RogueTea commented on July 23, 2024

Upon reflection I think it also doesn't consider the possibility of a max date/time being set as well.

from primeng.

RogueTea avatar RogueTea commented on July 23, 2024

So I think the solution should be something similar to this. I still think it should loop through the hours so id min hour was 7 and user clicks decrement it should go to 9. I think this will help with user accessibility, instead of two clicks of increment to reach 9, it is one click of decrement instead.

// For the case where min date is the same as max date. Should loop through respective hours and minutes case isMinMaxSameDay && this.minDate.getHours() > convertedHour: returnTimeTriple[0] = this.maxDate.getHours(); break; case isMinMaxSameDay && this.maxDate.getHours() < convertedHour: returnTimeTriple[0] = this.minDate.getHours(); break;

I should have a PR up for this later today.

from primeng.

juanguerra97 avatar juanguerra97 commented on July 23, 2024

So I think the solution should be something similar to this. I still think it should loop through the hours so id min hour was 7 and user clicks decrement it should go to 9. I think this will help with user accessibility, instead of two clicks of increment to reach 9, it is one click of decrement instead.

// For the case where min date is the same as max date. Should loop through respective hours and minutes case isMinMaxSameDay && this.minDate.getHours() > convertedHour: returnTimeTriple[0] = this.maxDate.getHours(); break; case isMinMaxSameDay && this.maxDate.getHours() < convertedHour: returnTimeTriple[0] = this.minDate.getHours(); break;

I should have a PR up for this later today.

Hello @RogueTea , thanks for the reply.

I'm not sure if the best way is to reset it to the maxDate because what if the user wants to get to the minimum possible value, if it resets to 9 in this case, then the user would have to click the decrement two times againt to reach 7. Also I am upgrading an application from version 6 of angular and primeng and in older versions it just stays at the minDate so maybe the users are used to the hour not restarting at the maxDate when it reaches the minDate.

from primeng.

RogueTea avatar RogueTea commented on July 23, 2024

It would still work the same way but different way around. If you were at 9 you'd Increment 1 and reset to 7. I'd be happy to remove this.

from primeng.

RogueTea avatar RogueTea commented on July 23, 2024

It might be worth checking with @cetincakiroglu

from primeng.

PhuocHoangMinhNguyen avatar PhuocHoangMinhNguyen commented on July 23, 2024

Can confirm this is still an issue at 17.18.3. I am downgrading to version 17.12.0 for this to work.

from primeng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.