You need to sign in to do that
Don't have an account?

disable date picker in date field?
Hi, I have an inputfield 'day of birth' in my vf page. since the datepicker doesn't work here (only works fine for years ahaid or a few years in the past) and therefore is confusing, I would like to switch it off.
Any tricks how to do that?
Do you want to disable date picker in the date field and date section? Try out the sample code given below :
<style> // for disable date picker
.datePicker, .datePicker .dateBar ,.datePicker .calBody, .datePicker .calDays, .datePicker .buttonBar, .datePicker Select
{
display:none;
}
</style>
.dateformat{ display:none;} // for disable date section
Did this answer your question? if so, please mark it solved.
Thanks for your help.
looks great, but I can't get it to work. probably my poor jacascript knowledge.
I tried putting the coding you gave directly into the page as well as an inline style:
but nothing happens...
There is no need to provide date picker style in inputfield style attribute. So remove that style from inputfield and declare
style after <apex:page> .
Hope this helps.
I'm not sure I understand.
I put the coding you gave in the page after <apex:page> as below (after original try I have now put the .dateformat line within the style block), but nothing happens on my page: the datepickers in all inputfields still remain.
Can you see where I am going wrong? By the way, I would expect I have to swith the datepicker etc. off for a specific date-inputfield. In fact I do want the date-picker to be shown with some other date-fields.
Hi, we seemed to be so near a solution... any idea how to solve this?