Date Picker Form Calendar

Hi I use a website for my business that I print reports from each week, the site requires me to put in a date range for the reports to run using a calendar date picker.

Screenshot 2021-04-01 at 20.33.29

I can select and bring up the calendar view with KM, but the dates can only be clicked on, you can't type the text field and you can't tab or use arrow keys to navigate around calendar.

I usually produce reports on a Tuesday for the previous Monday to Sunday. Any thoughts on how I could use KM pick the right dates.

Thanks

Sam.

Unfortunately there is no easy way to do this reliably other than using Javascript to assign the date, and it requires specific knowledge on how the website implement the calendar. (or maybe the url can be used to set the date , though this depend on the website )

The following action is used to set the date programmatically.

1 Like

Hey Sam,

Welcome to the forum!   :smile:

This may or may not be simple using Found Image actions.

I was able to get it working without much drama by finding a unique image:

image

And using it to calculate the dimensions of the picker dialog to restrain the area later found image actions have to look in.

It works for me with the image you posted to the forum, but without testing the genuine article I can't make any promises.

Play with the appended macro, and see if you can get it working.

Click in the image wells of the found-image actions and type the spacebar to bring up a Quick Look window of the images. You'll need to recreate them on your own system to make sure the resolution is correct for Keyboard Maestro.

Feel free to ask questions.

It would definitely be more efficient and robust to use JavaScript as @macdevign_mac suggests, but that can be very tricky and isn't always possible.

-Chris


Drive Date Picker Form Calendar Widget v1.00.kmmacros (75 KB)

1 Like