How to check if the selected date and time is after the current time?

I am making an application. Where the user needs to schedule the task so I have to check whether the date and time selected in the different date picker and time picker are after the current date and time means are in future of not.
Eg:- If the current date and time are 3rd April 2021 12:00 and the user-selected date in the date picker and Time in Time Picker is 3rd April 2021 11:00, then it should notify the user about wrong input.

Welcome. Since you are a passionate developer maybe you can show what you have tried and searched on the community. :grin:I see you have a reading time of only 3 minutes as of now. I believe passionate developers like to learn a lot by searching and trying.

First set user to pick day then time. After picking compare the current date Nd time with picked date and time using if condition

I have started with this account in the community now but before this I was using from another account.

What is your other account? You are only allowed one.

1 Like

The previous account was my personal while this is my company’s account.
I authorized this to the community just now.
Could you please help, me with the solution?

First of all what is your other account? and second if you used search :mag: you would have found

2 Likes

But how to convert current date to instant?
I did this with time but I was unable to find the way to convert current date to instant.

I will give you a hint check clock component’s blocks