|
 |
|
|
Hi all I have created a Two Coordinated Dates datapicker and some condiation follow under mention: You cannot choose days prior to today. You cannot choose a check-out date prior to the check-in date. Clicking the Reset button clears the dates. The default date in the Check-out calendar is the date chosen in the Check-in calendar. This is useful when the Check-in date is several months in the future, so the user doesn't need to scroll twice.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Now I have my threat was done and publish an own article with my DatePickerCustomControl. Naturally with Credits to the original Suggestor Guyon and Nikita. If you are interested on DatePickerCustomControl: klick me.
Stephan
\\\|/// \\ - - // ( @ @ ) +---------------oOOo-(_)-oOOo-----------------+ | Stephan Pilz stephan.pilz@stephan-pilz.de | | www.stephan-pilz.de | | ICQ#: 127823481 | +-----------------------Oooo------------------+ oooO ( ) ( ) ) / \ ( (_/ \_)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
hi Stephan Pilz,
i don't know how to user this date control in ASP.can u give me some information please....
Regards,
-Disa Kansagara
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
hi ,
i already clicked on that link. but it's for the asp.net i want to use only asp .i don't know anything about asp.net.if you have idea for the asp then reply ok
thanks for your reply,
regards
-Disa
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
Sorry Disa,
Today I can't help you. The Control is for .NET only. But in ASP you can use the "original"-Code in this Article.
BR Stephan
\\\|/// \\ - - // ( @ @ ) +---------------oOOo-(_)-oOOo-----------------+ | Stephan Pilz stephan.pilz@stephan-pilz.de | | www.stephan-pilz.de | | ICQ#: 127823481 | +-----------------------Oooo------------------+ oooO ( ) ( ) ) / \ ( (_/ \_)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
how i can user the following date picker control
that is available on www.codeproject.com/jscript/datepicker.asp
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I don't know if you are aware of this, but somebody is claiming your code as their own without acknowledgement: http://www.webreference.com/programming/javascript/gr/
Just thought you might like to know.
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
Hm. If you look at the bottom of the page you linked, you will see:
Created: June 2, 2003 Revised: December 26, 2003
Maybe our Nikita have ripped the code and not the other guy. This thesis substantiated, if you read Nikita's comments (or not existing comments) from all posts in this article. I think he does not understand the code he have posted. For example, I post some bugfixes many time ago, and there was no comment or new version from Nikita, but many other peoples ask me for my bugfix and extented version.
What do you think about that?
Best regards Stephan
\\\|/// \\ - - // ( @ @ ) +---------------oOOo-(_)-oOOo-----------------+ | Stephan Pilz stephan.pilz@stephan-pilz.de | | www.stephan-pilz.de | | ICQ#: 127823481 | +-----------------------Oooo------------------+ oooO ( ) ( ) ) / \ ( (_/ \_)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hello Nikita,
I'm glad you liked my article. I see you have made a few minor changes but I think it would have been proper to give credit where it is due.
Kindest regards
Guyon Roche.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I apologise for suggesting that you were a plagiarist, Mr Roche. It appears that Stephan is correct and that you are the author of this code, not Nikita. It has proved very useful, so thank you.
Regards
Paul
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Cheers Paul,
No probs. There's so much plagiarism going on on the internet it's easy to make a mistake.
In fact, in a way I feel honoured to have been plagiarised - it's almost a status symbol 
Guyon.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hello Guyon Roche,
welcome on the CodeProject-Board. I hope, you will post many good articles here.
Maybe you are interested on my bugfixes and changes of the DatePicker  Here you can find a short description.
BR Stephan
\\\|/// \\ - - // ( @ @ ) +---------------oOOo-(_)-oOOo-----------------+ | Stephan Pilz stephan.pilz@stephan-pilz.de | | www.stephan-pilz.de | | ICQ#: 127823481 | +-----------------------Oooo------------------+ oooO ( ) ( ) ) / \ ( (_/ \_)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
Can't see the proper Symbols in Cyr in datepicker.
Whats the problem?... How to modify Render method to supply the proper win-1251 encoding?
And could you please deploy your css styles?
DCH
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
I suppose the problem is the incorrect encoding the script or the page was saved with. Set the encoding of the page to the proper one (cp1251 or UTF8) - use "Save As" and "Save With Encoding" from Visual Studio, or use another text editor.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Good morning Nikita,
Nice article and code. Exactly, what I looking for. I give you 4, because there was some bugs 
If I click on "Next Week"-Button, there is a missing object in JavaScript. I determine, that the function getDaysInMonth does'nt exist. Here comes the bugfix:
DatePicker.prototype.getDaysInMonth = function (calDate) { var days; var month = calDate.getMonth () + 1; var year = calDate.getFullYear (); // RETURN 31 DAYS if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) { days = 31; } else if (month == 4 || month == 6 || month == 9 || month == 11) { // RETURN 30 DAYS days = 30; } else if (month == 2) { if (isLeapYear (year)) { // RETURN 28 DAYS days = 29; } else { // RETURN 28 DAYS days = 28; } } return (days); }
Replace all getDaysInMonth calls in code through this.getDaysInMonth
Next problem was the dynamic positioning of the span-Tag. You must add the line
this.oSpan.style.position = "absolute";
in DatePicker.prototype.show-Method.
I have extend the code with some nice colors. In this connection I think it's a good idea to highlight the actual date. For this you should do:
in DatePicker.prototype.fill-Method: ...
if (d.getDate () == this.dt.getDate ()) { this.aCells[nRow][nCol].className = 'DatePickerBtnSelect'; this.aCells[nRow][nCol].bgColor = "orange"; } ...
in DatePicker.prototype.clear set color back (i.a. yellow):
DatePicker.prototype.clear = function () { for (var j = 0; j < 6; j++) { for (var i = 0; i < 7; i++) { this.aCells[j][i].innerHTML = " " this.aCells[j][i].className = 'DatePickerBtn'; this.aCells[j][i].bgColor = "yellow"; } } }
For the next and last 3 extension is not enought place here. If you want it, send me an email. - I add a check function on the input-field, that checks the date for correct input, if the user enter a date manually - I extend your class for multilanguage support - I encapsulate all the function in a custom control written in VB.NET
Best regards Stephan Pilz
-- modified at 2:34 Wednesday 21st December, 2005
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
Great code Stephen.
The getDaysInMonth() function could be condensed a bit...
DatePicker.prototype.daysInMonth = [31,28,31,30,31,30,31,31,30,31,30,31]; DatePicker.prototype.getDaysInMonth = function (calDate) { var month = calDate.getMonth(); if ( (month == 2) && isLeapYear(calDate.getFullYear()) ) { return 29; } else { return this.daysInMonth[month]; } }
Guyon
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
Hello Guyon,
thanks for the "Great code"-Statement.
Now I have my threat was done and publish an own article with my DatePickerCustomControl. Naturally with Credits to you and Nikita. If you are interested look here.
Bye Stephan
\\\|/// \\ - - // ( @ @ ) +---------------oOOo-(_)-oOOo-----------------+ | Stephan Pilz stephan.pilz@stephan-pilz.de | | www.stephan-pilz.de | | ICQ#: 127823481 | +-----------------------Oooo------------------+ oooO ( ) ( ) ) / \ ( (_/ \_)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
Good!
However, I have some questions to ask:
1. I can't fill any color to the calendar 
2. When I click on the any items at the bottom of calendar, it doesnt work or wrong???
Here is the source-code:
<head> <script language="javascript" src="DatePicker.js"></script> </head> <body> <input type="text" class="DatePickerValue" name="xvb" id="xvb" style="width: 64px;" value="1.1.2005" title="title"> <img src="images/buttons/dp.gif" class="LinkedElement" önclick="DatePickerShow(xvb, xvbCh);" title="Âûáðàòü" name="xvbCh" id="xvbCh" title="âûáðàòü"> < span id="theDatePicker" name="theDatePicker" style="z-index: 1; removed: absolute;" >< /span > </body>
(sorry! I cant post the SPAN tag) any wrong?
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |