Skip to main content main content

Custom Date Formats

Starting with version 1.3.3, Pop-up Excel Calendar supports "custom date formats" that enables you to specify your own valid and/or invalid date formats. If a custom date format is added to the Valid date format list, Pop-up Excel Calendar recognizes it as a valid date format, no matter whether it is a normal date format in Excel; likewise, if a custom date format is added to the Invalid date format list, the format will never been seen as a date format, even if Excel itself can apply it.

Note: This document was written for Pop-up Excel version 1. For the latest version of this document for our Excel Date Picker, please download it here.

Let's find out how to use custom date formats by an example.

By default, Pop-up Excel Calendar displays the in-cell icon button for cells formatted with Text, since Excel can format a date value with the Text format. Here is how you can change this default behavior by utilizing custom date formats in Excel 2003.

  1. Click the Settings button on the Pop-up Excel Calendar toolbar to display the Settings window.
  2. Click the Custom Date Formats button to open the Custom Date Formats window. As you can see from the figure, the Custom Date Formats window provides two lists, one for valid date formats and the another for invalid date formats.

    pop-up Excel Calendar (Excel date picker) custom formats
    Custom formats for the Date Picker - Click to enlarge

  3. To find out the format codes of the Text format, click the Format Cells/Number button, which opens the Number tab of the Format Cells dialog box provided by Excel.

    pop-up Excel Calendar (Excel date picker) - Format Cells
    Format Cells for the Date Picker - Click to enlarge

  4. In the Category list, choose Text. See the figure above.
  5. Click Custom in the Category list. In the Type section, Excel selects the format code of the Text format automatically. As you can see, the format code of the Text format is "@".

    pop-up Excel Calendar (Excel date picker) - Number Tab
    The format code of Text format - click to enlarge

  6. Click OK or Cancel to close the Format Cells dialog box. Closing the dialog box does not modify the format of the current selected cell, no matter which button, OK or Cancel, you click to close the dialog box.
  7. Now on the Custom Date Formats box, click to activate the text box below Invalid date format, enter "@" - the format code of Text format.

    pop-up Excel Calendar (Excel date picker) - Invalid format
    Add an invalid date format - click to enlarge

  8. Click Add.
  9. Click OK to close the Custom Date Formats dialog box.
  10. Click OK to close the Settings dialog box.
  11. Now if you click a cell formatted with Text, the in-cell icon button won't appear.