mobile app touch

Hi webix team!
I develop mobile app with Webix 6.1.5
How can I use Chrome pull-to-refresh event? It doesn’t work.
Can I change mounth in datepicker by horizontal scrolling?
Now mounth changed only by arrows.
Thank you in advance!

datepicker event onSwipeX doesn’t work

I try
$$(“datepicker”).touchable = true;
webix.Touch.enable();
But without success…

Hey @valk20, if you are only aiming to change months and not fully mimic the arrow functionality (as it also switches between different time periods, depending on your choice), then this is doable with the help of showCalendar method of the calendar view inside of the datepicker.

I’d also like you address your statement

datepicker event onSwipeX doesn’t work

It does actually work, but you’ve probably tried using it in the way you didn’t realize fully, since the datepicker view is the input itself that you see, not the popup calendar you are trying to attach the event to.

That’s why you’ll need to access the calendar view in some way. For instance you can attach an event in the body of the suggest view (suggest would be the popup window, and the body would be the calendar itself) of the datepicker view.

The end result would look something like this (you can test this page using a mobile device): https://swipe-calendar.netlify.com/.

And here is the source code from the example: https://snippet.webix.com/zled3xkh.

Please be careful when working with touch events and touch devices in general using Webix. In order to initialize the proper handling of native and Webix-based touch events, you should warp your code in the following construct:

webix.ready(function(){
  if ( webix.env.touch ){         // if touch device is detected
      webix.ui.fullScreen();
      webix.Touch.limit(true);
  };

  webix.ui(
   //your code
  );
  
});

Thanks a lot!
What about swipeing to change time periods (years)? It is possible?
How enable refresh page by swiping down in Chrome browser?

Unfortunately it is not possible to fully imitate the arrow functionality via API. You are pretty much limited to the time frame of a month. It is possible to imitate a click on the appropriate node (https://snippet.webix.com/07dtqwxx), but it is not really supported on touch devices.

As for the pull to refresh functionality, I don’t think it works with Webix, since it is enabled by default. Seems like Webix is blocking the default behaviour, at least I couldn’t get it working with different setups.