Re: Web custum control

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Peter Blum (PLBlum_at_Blum.info)
Date: 02/07/04


Date: Sat, 7 Feb 2004 15:40:21 -0500

It is very tricky to build the necessary javascript that maintains fixed
text (the dashes) within a textbox and moves the insertion point along.
Simply put, HTML wasn't designed to do that. To my knowledge, IE's DHTML
library comes closest to giving you the tools that allow modifing the
inserting point and replacing characters in text.

I recommend letting users enter text in your format and reformatting as they
exit the field. That's what I did in my commercial DateTextBox property,
"Peter's Date Package" (http://www.peterblum.com/datecontrols/home.aspx). In
my case, I developed the ability for the user to omit separators and have
the code re-insert them during reformat. For example, if they type "0312",
the software reformats to 03-12-2004 (determining the year from other
rules.) Peter's Date Package fully supports localization of date formats.
You specify your desired ShortDatePattern and DateSeparator.

--- Peter Blum
www.PeterBlum.com
Email: PLBlum@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Karl Jensen" <karl@jensen.dk> wrote in message
news:O6qb76P7DHA.2480@TK2MSFTNGP10.phx.gbl...
> Not quiet , i want to display " -- -- " in a textbox like control
with
> tab navigation beetwenn fields the box.
> A user should then be able to fill in the fields like this:
> "12--03--04" .
> Make sens?
>
> "JaD" <jad@nospam.com> wrote in message
> news:uh0FAmP7DHA.2628@TK2MSFTNGP10.phx.gbl...
> > Are you trying to validate input? You could probably just use Regular
> > Expressions...
> >
> >
> > "Karl Jensen" <karl@jensen.dk> wrote in message
> > news:%23hL1ndP7DHA.2432@TK2MSFTNGP10.phx.gbl...
> > > Hello gurus,
> > > I would like to build a text box like date field in the following
format
> > > :dd-mm-yy. My thougts are that this should be possible with a web
custum
> > > control or by inheriting from a text box and override the render
method
> to
> > > get the desired effect.
> > > Can anyone tell me if i'am on the right way or not. And if not , were
> > should
> > > i look instead.
> > >
> > >
> > > Thanks in advance
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: Why do I have two consecutive pages numbered "1"?
    ... With the insertion point in the second section, go to the Page Number Format dialog and choose "Continue from previous section." ... Without knowing which version you have, I can't be more specific about how to get to the dialog, but there's a Format Page Numbers button on the Header and Footer toolbar in Word 2003 and earlier. ... "Sommervi" wrote in message ... reformatting. ...
    (microsoft.public.word.docmanagement)
  • Re: [opensuse] quick question re word wrap protocol
    ... configuration is applied to all messages, ... my client didn't reformat that text - her's did. ... Your reformatting is just like my client does, ... Most of the format differences, colored text, pretty pictures, html, and ...
    (SuSE)
  • Re: Corrupted OS
    ... Is it possible to rebuild an OS without reformatting the hard drive? ... First of all, strictly speaking, when installing FreeBSD you never ... FreeBSD and all other OSen use the factory format ... somewhere safe and do the complete reinstall from scratch and then ...
    (freebsd-questions)
  • Re: Footer Page Numbers
    ... >I have macros to insert an A4 Landscape Page, ... The insertion works wonderfully, ... > however the page numbering in my footer restarts at 1 on ... > the format to continue from pervious it updates and all ...
    (microsoft.public.word.vba.general)
  • Re: Corrupted OS
    ... Is it possible to rebuild an OS without reformatting the hard drive? ... First of all, strictly speaking, when installing FreeBSD you never ... FreeBSD and all other OSen use the factory format ... somewhere safe and do the complete reinstall from scratch and then ...
    (freebsd-questions)