search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Row Filter

Asked by Richard
4 years ago.

Hi
I am working with dp scheduler for hotel room reservations.
I need to filter all rows which have no room name.
I did it like explained in https://doc.daypilot.org/scheduler/row-filtering/ and runs good but I need to filter these rows automatically on page load without user intervention.

Your help is appreciated.

Thanks

Answer posted by Dan Letecky [DayPilot]
4 years ago.

Since build 2535 you can call

dp.rows.filter("filter");

before .init() to apply the filter.

You can get the latest build in the sandbox:
http://javascript.daypilot.org/sandbox/

Let me know if it doesn't work as expected.

Comment posted by Richard
4 years ago.

Hi
I'm using the 2536 build, the filter works perfectly when I type values ​​in the input field.
Introducing a space as input I achive exactly what I need, all empty fields dissapear.
The problem is still I cannot find a way in which the filter automatically removes my empty fields on page load.

When calling dp.rows.filter before .init() scheduler does not load.

Comment posted by Dan Letecky [DayPilot]
4 years ago.

> When calling dp.rows.filter before .init() scheduler does not load.

Is there any error in the browser console (there should be if the Scheduler doesn't load)? Can you please post the error details?

Comment posted by Richard
4 years ago.

Hi Dan
The filter is running fine, it was my fault, daypilot script was being cached by the server so it was running the old build.

Today morning as I started working the DEMO banner appeared on the left side and I noticed what was happening.

With

dp.rows.filter(" ");
dp.init();

is easy to hide all empty rows (in my case out of service hotel rooms) on page loading.
It was usefull to download from the sand box, in other way perhaps I would have never noticed the problem.
I will now donwload the new build from my customer account and replace the script.

Many thanks for your help
Best Regards

Comment posted by Richard
4 years ago.

Do you have an idea when 2536 will be ready on customer area?

Comment posted by Dan Letecky [DayPilot]
4 years ago.

Richard,

The new release (8.3.2542) which includes this improvements is now available:
http://javascript.daypilot.org/daypilot-pro-for-javascript-8-3-sp3/

You'll find the full build in the customer area.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.