Coder Social home page Coder Social logo

Comments (9)

qodesmith avatar qodesmith commented on July 22, 2024

Hmmm... I'll look into it hopefully tonight. I'll circle back as soon as I have a fix.

from datepicker.

mrispoli24 avatar mrispoli24 commented on July 22, 2024

@qodesmith

I have the solution but it makes no sense to me why this worked exactly:

const picker = datepicker(document.querySelector('#moveInDate'), {
    formatter: function(el, date) {
      el.setAttribute('placeholder', '');
      el.setAttribute('value', date.toISOString().slice(0,10));
    },
      onSelect: function(instance) {
      // Show which date was selected.
      console.log(instance.dateSelected);
    },
    onShow: function(instance) {
      console.log('Calendar showing.');
      $('.square').on('click', function(e){});
      $('.arrow').on('click', function(e){});
    },
    onMonthChange: function(instance) {
      // Show the month of the selected date.
      console.log(instance.currentMonthName);
      $('.square').on('click', function(e){});
      $('.arrow').on('click', function(e){});
    },
      disableMobile: false,
    });

So by adding these click events on the show and month change events it starts working on mobile. I'm not really sure why and I'm thinking maybe Safari/Chrome have a different way of handling event propagation for touch screens that requires this. I'm going to see if I can figure out why exactly this worked but right now it appears rather magical.

from datepicker.

ravibhoraniya avatar ravibhoraniya commented on July 22, 2024

hello,
how to particular single date disable plz give me a idea.

thank you.

from datepicker.

qodesmith avatar qodesmith commented on July 22, 2024

Hey @ravibhoraniya. Sorry for the delayed response. Not sure I understand your question. What exactly are you looking to do?

from datepicker.

qodesmith avatar qodesmith commented on July 22, 2024

@mrispoli24 I know it's been a while. I've updated the code and removed a mutation observer that was responsible for showing & hiding the calendar. If you can, try the latest version and see if that solves the issue.

from datepicker.

mbruggenwirth avatar mbruggenwirth commented on July 22, 2024

I use the latest version (2.1.5) but I have a problem with de selection of a date on IOS.

from datepicker.

RakeshGowdaM avatar RakeshGowdaM commented on July 22, 2024

Hi, ngb date picker is working fine on mobile and desktop. Only on ipad it's not working. As soon as I click on month or year the calander is getting close. Not able to select the date on ipad tab

from datepicker.

payalpedkar avatar payalpedkar commented on July 22, 2024

@RakeshGowdaM
Hi I am facing same problem.
Any soultion?

from datepicker.

qodesmith avatar qodesmith commented on July 22, 2024

Is this still a problem with the latest version - 5.0.2?

from datepicker.

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.