Jason Moon's Fool-Proof Date Input Script (with calendar)

Thursday 17th of August 2017 03:24:50 PM
Contact Jason Visit Jason's Site

Called with the "DateInput" function. Parameters are:

  1. DateName - STRING - name of the hidden form element to store the selected, formatted date
  2. Required - BOOLEAN - optional; default = FALSE
  3. DateFormat - STRING - optional
  4. DefaultDate - STRING - optional; default = current system date from the client PC
Birthday:
 
* required
Called like this: DateInput('birth_date', true, 'DD-MON-YYYY', '01-AUG-1976')
 
 
Anniversary:
 
Called like this: DateInput('anniversary', false, 'DD-MON-YYYY', '28-JUN-2003')
 
 
Some Date:
 
Called like this: DateInput('some_date', false, 'DD-MON-YY')
 
 
Today:
CSS2, it is possible to set up a situation where scrollbars would be applied to an element such as a paragraph.

It's also possible to set the top and bottom margins of a block-level element to be auto. If either of these properties is set to auto, it is reset to 0 (zero), effectively removing any top or bottom margin from the element box, as shown in Figure 8-5. The lack of any space between the borders of

 
Called like this: DateInput('today', true)
 

Supported date formats:

* Can specify a 2-digit year


Customizable variables:


View the JavaScript source!

In this chapter, we study the basis for almost everything that can be done in CSS: the units that affect the color used or the distance set for a whole host of properties. Without units, it wouldn't be possible to declare that a paragraph should be purple, or that an image should have ten pixels of blank space around it, or that a heading should be a certain size. By understanding the concepts put forth here, you'll be able to learn and use the rest of CSS much more quickly.

However, that's the good news. The bad news is that this leading.

WARNING

Percentage values are relative to the font size of the element.

In technical terms, every element in a line generates acontent area, which is determined by the size of thefont. This content area also generates an inline

This happens because margins on inline elements don't change the line height of an element. (In fact, the only properties that can change the distance between lines containing only text are line-height, font-size, and vertical-align.)

However, all of this is true only for the top and bottom sides of inline elements; the left and right sides are a different story altogether. We'll start by considering the simple case of a small inline element within a single line, as depicted in Figure 7-22. small caps text. If you aren't familiar with such an effect, It Looks Something Like This . Instead of upper- and lowercase letters, a small-caps font employs uppercase letters of different sizes. Thus you might see something like the following, shown in Figure 5-29:the result in Figure 7-38 as follows:

As we can see in Figure 7-41, despite the fact that the border's width was set to be 20px , when the style is set to none, not only does the border's style go away, so does its width! Why?

If you'll remember, the terminology used in the previous section was that a border with a style of none does not exist. Those words were picked carefully because they help