Thread: Limit Date Picker


Permlink Replies: 7 - Pages: 1 - Last Post: May 12, 2008 7:10 AM Last Post By: lgcarrier
alberto.martin....

Posts: 26
Registered: 08/21/07
Limit Date Picker
Posted: May 9, 2008 5:03 AM
Click to report abuse...   Click to reply to this thread Reply
Hi everybody,

I would like to know if it's possible to limit the LOV of years in a date picker. For example limit only from 2000 to 2010.

Thank you!
Arie Geller

Posts: 3,368
Registered: 06/18/00
Re: Limit Date Picker
Posted: May 9, 2008 9:34 AM   in response to: alberto.martin.... in response to: alberto.martin....
Click to report abuse...   Click to reply to this thread Reply
Hello,

>> I would like to know if it's possible to limit the LOV of years in a date picker

No, you can’t do it with the built-in date picker. You can validate the chosen date, and if the year is too high, issue a proper alert.

Regards,
Arie.
Denes Kubicek

Posts: 4,839
Registered: 06/22/00
Re: Limit Date Picker
Posted: May 9, 2008 2:12 PM   in response to: Arie Geller in response to: Arie Geller
Click to report abuse...   Click to reply to this thread Reply
Eventually, this could be done. In theory, you could manipulate the view

wwv_flow_years

to show the number of years you want to see depending on some value set by your
session. For that, you would need to call the

flows_030000.wwv_flow_utilities.show_as_popup_calendar

from an application process and not through the standard interface.

The downside is that you need to take care of updating this view after the next upgrade.

I think this limitation could be an enhancement for the future releases since there is no
reason why the calendar has to always show the same number of years.

But, as I said, this is only theory. Maybe I try to set it up that way. If I succeed, I will
make a blog posting.

Denes Kubicek

http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://htmldb.oracle.com/pls/otn/f?p=31517:1

Arie Geller

Posts: 3,368
Registered: 06/18/00
Re: Limit Date Picker
Posted: May 10, 2008 8:41 AM   in response to: Denes Kubicek in response to: Denes Kubicek
Click to report abuse...   Click to reply to this thread Reply
Hello Denes,

>> In theory, you could manipulate the view wwv_flow_years

In principle, I’m trying to avoid offering undocumented (hence, unsupported) solutions. I leave that to the APEX team, and very experience developers like you. However, I’m curious about what you are proposing. Wouldn’t changing this view affect ALL the date picker items on all the applications in all the workspaces of this instance?

I agree with you that the current date picker can use some enhancements, and if memory serves, in one of Joel’s threads, he said they are checking it.

Thanks,
Arie.
Denes Kubicek

Posts: 4,839
Registered: 06/22/00
Re: Limit Date Picker
Posted: May 11, 2008 3:04 AM   in response to: Arie Geller in response to: Arie Geller
Click to report abuse...   Click to reply to this thread Reply
Hello Arie,

I don't like workarrounds either. However, they are sometimes necessary. What I head in
mind is to modify the view so it returns the same result for all standard date pickers and
to return what you want if you request that. Let me try this out and I will post my findings
here soon. I investigated into this issue and then Patrick mada a proposal to solve it using
a process on demand.

Denes Kubicek

http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://htmldb.oracle.com/pls/otn/f?p=31517:1

Denes Kubicek

Posts: 4,839
Registered: 06/22/00
Re: Limit Date Picker
Posted: May 11, 2008 2:14 PM   in response to: Arie Geller in response to: Arie Geller
Click to report abuse...   Click to reply to this thread Reply
O.K.

I tested this and it does work. You can do a limitation on a date picker quite easily. I will blog
on this tomorrow.

Denes Kubicek

http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://htmldb.oracle.com/pls/otn/f?p=31517:1

Denes Kubicek

Posts: 4,839
Registered: 06/22/00
Re: Limit Date Picker
Posted: May 12, 2008 3:43 AM   in response to: Denes Kubicek in response to: Denes Kubicek
Click to report abuse...   Click to reply to this thread Reply
lgcarrier

Posts: 288
Registered: 05/25/06
Re: Limit Date Picker
Posted: May 12, 2008 7:10 AM   in response to: Denes Kubicek in response to: Denes Kubicek
Click to report abuse...   Click to reply to this thread Reply
Thx for the good work!

Louis-Guillaume


Homepage : http://www.insum.ca
InSum Solutions' blog : http://insum-apex.blogspot.com
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums