Selecting Date in Computer vision

Hi All,

I have one scenario, I need to select a date on Citrix based web. And condition are:-

  1. Need to select a previous date (e.g- if today than we need to select yesterday date) and
  2. if we are working on monday we need to select the previous date of friday. (Exclude satday and sunday)
  3. we need to exclude some holiday too.

Note:- I have tried through input dialog but there we cant use type into activity as its not a text filed.

Regards,
Keshav

Can you please share screenshot of your date field

Otherwise 3 points/conditions which you mentioned that need to handle through date manipulations/logic.

@kuldip.gohil
Hi Kuldip,

here is the screen shot:-
image
once we click on calendar

image

And that date field is not editable so i can’t send the date manually. I need to select the date from calendar.

And could you please describe date manipulations/logic what u are talking about.

Reagrds,
Keshav

@Palaniyappan
@srdjan.suc
@lakshman
@balupad14
@TimK
Hi All,
Could you please suggest solution on this scenario.

Thanks,
Keshav

So firstly working out previous date is purely logic based:

  • You need to get today’s date using Datetime.Now
  • Minus a day at a a time (you can use .AddDays(-1)
  • check if that date is either a saturday / sunday (Using .DayOfWeek.ToString) or a date in a list or datatable of holidays (you will need to create this list with specific dates) .
    • (If List use List.Contains)
    • (If datatable Select function etc)

This will enable you to work out how many days you need to go back from today’s date to get the previous working day.

Once you have the date in your date picker, simple looks at selectors to determine how you can select the right day of the month

Hope this helps :slight_smile:

@TimK
Thanks for Replying.

Understand the logic. But I need to implement this on citrix based web.
ll it work??

And if you have any such type of example could you please share the code

Thanks,
Keshav

Hi @keshav

These two stuffs can be handled with what @TimK suggested, but this one

we must have those dates stored in a list, as it differs with the places
for saturday and sunday we can check with a if condition like this
yourdatetimevariable.DayOfWeek.ToString.
with which we can check whether it is “Saturday” or “Sunday”

for dynamic selection of date in a calender, i hope this would help you buddy

Cheers @keshav

Hi @Palaniyappan

I am working on It what @TimK is suggested. I am Able to Select yesterday’s date in calendar.
Hope I can achieve the rest condition as well.

Regards,
Keshav

Fantastic
Cheers @keshav