Does anyone know of a way to duplicate a DTP in asp.net?
Thanks
Printable View
Does anyone know of a way to duplicate a DTP in asp.net?
Thanks
<asp:calendar
for the date anyway.
But thats like the Monthview control. I'm looking for something like the VB6 DTP. :)
I would like to find one too.
Free and that's minimized, then you click it and a pannel opens up with a nice calendar.
HoraShadow
You want something like this? See the example here..
http://www.javascriptkit.com/script/...calendar.shtml
Or you don't want to open the calendar in another window like that?
That's a nice one too.
I saw some that open on the same screen, like a hidden layer. It was very nice, but you had to pay for it.
That may work and looks nice but what if they have a popup blocker?
Ok, I got it integrated into my aspx table but I cant get the text and image to align left and right respectively.
I had it working but I got a format/parse error and lost the page. :mad:
This is how it currently looks but its breaking across two lines. :sick:
On the picker, add the following, and place the picker BEFORE the text "DOB"
style="float:right"
... Or, right align the cell, and instead, change the text DOB to the following:
<DIV style="float:left; clear: none">DOB</DIV>
Not sure where to place a DIV for this...?
VB Code:
<asp:TableCell BorderStyle="Solid" BorderWidth="1px" VerticalAlign="Middle" BackColor="Firebrick" ForeColor="White" HorizontalAlign="Left" BorderColor="White" Text=" DOB<a href="javascript:NewCal('DOB1','mmddyyyy',false,24)">< img src="../images/calendar.gif" align="right"></a>"> </asp:TableCell>
My you like doing things the hard way =)
Code:<asp:TableCell BorderStyle="Solid" BorderWidth="1px" VerticalAlign="Middle" BackColor="Firebrick"
ForeColor="White" HorizontalAlign="Left" BorderColor="White">
<div style="float:right"><a href="javascript:NewCal('DOB1','mmddyyyy',false,24)"><img src="../images/calendar.gif"></a></div> DOB
</asp:TableCell>
Nope, all it did was switch the vertical appearance. This is not the way I want to do it but asp.net changes the basic html code tobe embedded in the Text property and encodes the html chars. :(
VB Code:
<asp:TableCell BorderStyle="Solid" BorderWidth="1px" VerticalAlign="Middle" BackColor="Firebrick" ForeColor="White" HorizontalAlign="left" BorderColor="White" Text=" <DIV style="float:right"><a href="javascript:NewCal('DOB1','mmddyyyy',false,24) "><img src="../images/calendar.gif"align="right"></a></DIV>DOB"> </asp:TableCell>
I have align="right" (align='right') on the imagetag, could that be an issue?
align="right" should go away, yes. You will see that I removed it when I reposted. The float element takes care of that in the proper manner. Remember, "DOB" goes after the DIV (see my example above)
Yup, that was it. The align='right' on the img tag was messing with it.
Thanks a Gig - LR. :thumb:
Always my pleasure! (Don't forget to resolve thread)
Well I was hoping that maybe someone may still have a link to a better dtp control that wont interfere with popup blockers.
So I'll leave it open for a whle. If I dont get or find anything then I will. ;)
What about hiding a claendar control and moving it to which ever button or link is click and then somehow link it to that textbox control so the results can be added to that textbox? Sounds ike too much js or trouble but would look and perform better I think.
Gotcha, no worries.
I have no ideas on a picker control, sorry.
Maybe something like showing the aspx calendar and create a session var to link the cal to the desired textbox. Then upon the selection populate it. All from the code behind?
I'm lost. What is it you want? I read both posts and can't piece together what you are looking for. What would the end-user experience be?
I have a page that is used for filling out a form. There are a couple of fields that a vb6-like dtp would come in handy. I want to use a control to make it easier for the user to select a date.
I figure that one calendar control can be reused with the multiple date fields.
Add a common DateTimePicker Control (VB6 or VB.Net) to a Form and look how it works. That's what he wants, but in a WebFormQuote:
Originally Posted by Lord_Rat
No, that's what he originally wanted. His new request is something different.
OK I see Rob responded as well. You want a control that when someone clicks on it, you can say which textbox it is linked to rather than having multiple controls, all linked to different boxes.
Am I right?
(And if so, I still got nothin, sorry)
I cant really add a COM dtp to the solution as its currently a hosted solution. Unless I am wrong onthis possibility?
You are 100% right. You cannot.
This is why I need an equilivalent for it. If I had a user control written in .NET then would I still be able to use it?
Depends on whether it is a windows control or a web control.
Logic would prevail and say that it should be a web control then correct.
Rob, all you need is a little javascript to place the calendar control 'next' to the input box you want it to appear by.
http://www.vbforums.com/
I've built a server control that utilizes one calendar control inside a div that can be placed anywhere on the client html page. Either you have an icon for showing the calendar next to each input control (which fires a javascript function in its onclick event to move the calendar next to it), or you can show it when the input gains focus.
Its not that time-consuming to build and at least this way you won't have 4 or 5 calendar controls when only one will ever be used at any one time.
YES this is what I wanted as the popup version may be blocked by a users popup blocker. Plus the aspx calendar control can be esigned to look just like the color scheme of your page.
You can use .Net forms user controls in web pages, these are then the equivalent of .Net applets, but much like Java applets, they require the client has the runtime installed on their machine.Quote:
Originally Posted by RobDog888
However, if it was me, I would go with DOM/script solution I mentioned above.
Ok, but I am short on time and havent written any real js code in about 8 years. :blush:
Rob.... That's asp:calendar which I mentioned at like post #2 =PQuote:
Originally Posted by RobDog888
And no, it is not blocked by popup blockers because it is an inline (on the page) element. It does not do times, however.
Yes, the Dom/script implementation wouldn't be affected by the popup blocker, which is one of many reasons why I used it (the other being no need to request another post to the server).Quote:
Originally Posted by RobDog888
On the other hand, most good popup blockers won't disable popups initiated by a user action (ie... clicking on a hyperlink) - so a normal implementation which requestis an aspx page that has a calendar control on it would most likely not be affected.
Yes, I seen your post earlier but I didnt know how to link it to multiple controls thus only using one calendar control.
The js popup calendar method I currently am using is ok but I would really like to have the aspx calendar control. :)
Gotcha Rob, no worries. I would add a button beside each textbox, clicking the button just changes the (at server side probably) .AssociatedControl property to the appropriate textbox and shows the calendar.
Well, ok then, I can get a public demo page up by tomorrow morning if you really need it. If you it will do for you, then I will forward the source code over to you. It's a combined DateTime picker control, so it actually renders the input fields for the date and time. The popup calendar just sets the date in the date field, and the time is a seperate field that the user has to type in. However, it can be set to the present time by simply hitting the space bar while focus is in the time field, and is does do regex checking to ensure the user doesn't input an invalid time. It also does do auto-complete on the time, so if you type 7, the colon automatically appears, then if you type 5 and 7, an AM or PM appears - christ its hard to explain in text..Quote:
Originally Posted by RobDog888
Since it was developed as part of a major reporting software solution, the source code does have a little too much - because it handles features like military or regular time... and max allowed dates etc... But best part is, this control doesn't require a postback !!!
If nothing else the source will give you the javascript to implement in your own control... or if you're really in a rush and have a budget for spending, you could just buy a packaged control.
Then again, if you're using .net 2.0, you could use the Atlas framework and just have it 'appear' magically by doing an XmlHttp request to replace the client html where needed, without the flicker, but that still involves processing on the server.
Hmm, didnt see the AssociatedControl property before.
Kind of in a time crunch but no budget for purchasing. :(
Maybe we can just get the aspx calendar to work with the AssociatedControl property.
I'll look up this property and see if I can get something working.
nemaroller , I dont want you to go to that much trouble for me so let me see if I can get the other solution working first. ;) Your offer is greatly appreciated though. ;)
No problem... it would have taken me an hour to extract the DateTime picker control out of its associated library anyway :), so less work for me!!
Rob, check out this (no popup), Basic version is free. Pro is trial.
Online Examples
Download
Found here, there are many, some of these are free and some not..
ASP Time Components
(6 pages of datetime web controls)
check this link people
DTP Light link
this company seems to sell a very professional date time picker control.
beside this they allow downloading of free to use and distribute light small version of their control. it has some limitations compared to their full version but it will do the job
i hope every one can use it
rgds
wow, that looks really cool but I would need to the full version as it has the AutoPostback and Today button and bolded dates. Still $185 is not out of reach but I will seriously consider it.
Thanks allot maged. :)