Re: Web custum control
From: Peter Blum (PLBlum_at_Blum.info)
Date: 02/07/04
- Next message: Peter Blum: "Re: Here is Code (C#) for CheckBox Validation on Server and Client"
- Previous message: Peter Morris [Droopy Eyes Software]: "Re: Web App need permission to post files to a virtual directory"
- In reply to: Karl Jensen: "Re: Web custum control"
- Messages sorted by: [ date ] [ thread ]
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
> > >
> > >
> >
> >
>
>
- Next message: Peter Blum: "Re: Here is Code (C#) for CheckBox Validation on Server and Client"
- Previous message: Peter Morris [Droopy Eyes Software]: "Re: Web App need permission to post files to a virtual directory"
- In reply to: Karl Jensen: "Re: Web custum control"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|