Showing posts with label calenderextender. Show all posts
Showing posts with label calenderextender. Show all posts

Saturday, March 24, 2012

Calenderextender problem

when I use the CalenderExtender with a html button as popupbutton and a asp.net text field as target control it works fine. but the problem is when the calender becomes visible if there are any dropdownlist then it is on the calender. so part of the calender becomes invisible. i.e. goes behind the DropDownList.

but if there is a textbox in the position of the DropDownList then everything works fine.

how do i solve this issue? Any idea?

Hi

I'm afraid that it's a normal thing and no solution yet,just avoid it.

Best regards

CalenderExtender not working when TextBox is not empty

Hi

I was testing the CalendarExtender control and it worked fine but only if the TextBox was empty. I'm guessing this is a bug...! Does anyone know how to fix it?

Cheers

I hv d same problem

Calender

not working if applyinf the format to

Calender

<

cc2:CalendarExtenderID="CalendarExtender1"runat="server"PopupButtonID="Image1"TargetControlID="txtdob"Format="dd-MMM-yyyy"></cc2:CalendarExtender><asp:TextBoxID="txtdob"runat="server"></asp:TextBox><asp:ImageID="Image1"runat="server"ImageUrl="~/images/Calendar_scheduleHS.png"/>

and behind code

txtdob.Text = myDate.

ToString("dd-MMM-yyyy");

if txtdob is already filled during page load

CalenderExtender in frameset problem

I have created an AJAX webpage which has been placed inside a HTML frameset(intranet at work). Outside the frameset, the calender extender works fine but inside the frameset I get a javascript permissions error. Anyone else had this problem?

Thanks,

Steve

Hi Stevedale,

I think your problem is a caused by Frameset + javascript rather than AJAX. First , you should check whether they are in different domains. Then please remove the interactions between the two Frameset. CalendarExtender is generated by a bunch of javascript. Here are two wonderful links(Link1,Link2);

If all these don't work, please feel free to let me know. And a tiny repro is preferred.

Best regards,

Jonathan

CalenderExtender and RequiredField Validator

hi all,

I have a problem with ajax. when I select a date from calendarExtender it shows date, but when I submit the form , right before submitting it clears the textbox.

So to get around of this problem I wrote some javascript on button click that sets textBox value to hidden field then I am getting that value from hidden field.

Now problem is that , even if textbox is not empty, it submits the form ( as required) but display requiredField validator error message also. that I don't want.

I mean after successfully processing the request it showing error message.

Hi

Can you give me code that replicates this behavior?

I think I had this issue once but I'm not sure anymore what triggers it.

With some code I might be able to find it!

Kind regards,
Wim


hi,

here goes my source view,

Remind me on</td><td valign="top">
<asp:TextBox ID="remindon" runat="server" ReadOnly="True" Width="89px"></asp:TextBox>
<asp:Image ID="imgCalendar" runat="server" ImageUrl="~/images1/iconCalender.gif" ToolTip="Click to see and hide the calendar" />
<asp:Button ID="btnAddReminder" runat="server" OnClick="btnAddReminder_Click" Text="Add Reminder" ValidationGroup="reminder" Width="103px" OnClientClick="javascript:setReminder();" />

And here is my java-script,

<script type="text/javascript" language="javascript">

function setReminder()
{
document.getElementById("hiddenRemindMeOn").value=document.getElementById("remindon").value;
if(validateDate(document.getElementById("remindon"))==true)
{
return true;
}
else
{
return false;
}
}
function validateDate(obj)
{
var currentTime = new Date();
var currentMonth = currentTime.getMonth() + 1;
var currentDay = currentTime.getDate();
var currentYear =currentTime.getFullYear();

var s=obj.value;
var arr=new Array();
arr=s.split("/");
var selectedMonth=arr[0];
var selectedDay=arr[1];
var selectedYear=arr[2];
//DateValidation selected date should not be less than current date:
if(s!="")
{
if(selectedYear<currentYear)
{
alert("you can not select a date less than today's date");
obj.value="";
return false;
}
else
{
if((selectedMonth<currentMonth) && selectedYear==currentYear )
{
alert("you can not select a date less than today's date");
obj.value="";
return false;
}
else
{
if(selectedDay<currentDay && selectedMonth==currentMonth)
{
alert("you can not select a date less than today's date");
obj.value="";
return false;
}
else
{
return true;
}
}
}
}
else
{
return false;
}
}
</script>

Now how to hide that required field validator error message , while it's processing form successfully....

waiting for reply..

thanks




oh, I had forgot to post required field validator code here,

here it is

<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="remindon"
Display="Dynamic" ErrorMessage="can not be blank" ValidationGroup="reminder"></asp:RequiredFieldValidator>

thanks...


... still waiting for solution.........


Sorry dude I can't work with your code ....

Please provide me with something that I can copy-paste and works!

Kind regards,
Wim


hi,

sorry for incomplete code, here is rest of the calendarExtender code.

rest of code is already given in previous post .

<cc1:calendarextender id="CalendarExtender1" runat="server" cssclass="cal" popupbuttonid="imgCalendar"
targetcontrolid="remindon" EnableViewState="true"> </cc1:calendarextender>

thanks for cooperation


Hi,

No offence but ....

..... still waiting for easy copy-paste code ....

I'm no monkey who takes all your snippets and tries to figure out what goes where, at least take the effort to give me some decent code!

Kind regards,
Wim


Ok I read through this thread again ...

Let's take a few steps back ...

WHAT is your initial goal?

Because by default, the date in the textbox will NOT dissapear!

That's why I asked for YOUR code, and not just some snippets. More like a page that works, AND shows me the wrong behavior.

All the javascript you are adding; writing to hiddenVariable ==> BullShit! This is all obsolete!!!!!!!!!

So please just give me a replication of the code that shows the wrong behavior and lets start from there!

Kind regards,
Wim


I got the problem. my TextBox is read only . when I make it ReagOnly=False , it works fine.

But I have to make it only readonly to force user to select date from calendar only.

Any way Now I am checking for all those at server side. and removed required field validator.

no issue now.......................................................

....thanks u consider my post..........


Hi forums_user,

This thread will answer some questions about why you had that weird behavior:

http://forums.asp.net/t/1188640.aspx

Kind regards,
Wim