 |
|
|
 |
|
|
 |
|
 |
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.
|
|
|
|
 |
|
 |
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 |
| <a href=www.stephan-pilz.de>www.stephan-pilz.de</a> |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
|
|
|
|
 |
|
 |
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
|
|
|
|
 |
|
 |
Hello Disa,
Why you don't klick the Link in my Post? Here comes the Link again:
http://www.codeproject.com/useritems/DatePickerCustomControl.asp
BR
Stephan
\\\| \\ - - ( @ @ )
+---------------oOOo-(_)-oOOo-----------------+
| Stephan Pilz stephan.pilz@stephan-pilz.de |
| <a href=www.stephan-pilz.de>www.stephan-pilz.de</a> |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
|
|
|
|
 |
|
 |
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
|
|
|
|
 |
|
 |
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 |
| <a href=www.stephan-pilz.de>www.stephan-pilz.de</a> |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
how i can user the following date picker control
that is available on
www.codeproject.com/jscript/datepicker.asp
|
|
|
|
 |
|
 |
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.
|
|
|
|
 |
|
 |
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 |
| <a href=www.stephan-pilz.de>www.stephan-pilz.de</a> |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
|
|
|
|
 |
|
 |
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.
|
|
|
|
 |
|
 |
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
|
|
|
|
 |
|
 |
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.
|
|
|
|
 |
|
 |
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 |
| <a href=www.stephan-pilz.de>www.stephan-pilz.de</a> |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
|
|
|
|
 |
|
|
 |
|
 |
Hi,
Thanks, i used also your calendar.......its really fantastic......nice
regards,
-Disa
|
|
|
|
 |
|
 |
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
|
|
|
|
 |
|
 |
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.
|
|
|
|
 |
|
 |
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 ();
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) {
days = 30;
} else if (month == 2) {
if (isLeapYear (year)) {
days = 29;
} else {
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
|
|
|
|
 |
|
 |
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
|
|
|
|
 |
|
 |
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 |
| <a href=www.stephan-pilz.de>www.stephan-pilz.de</a> |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
|
|
|
|
 |
|
 |
The calendar derives from a base class that doesn't appear to be included.
|
|
|
|
 |