Threaded View

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Vote Rating
    gretchen23 is on a distinguished road


    Default Answered: Datefield validation

    Answered: Datefield validation


    I have a datefield on my form. Right now, my date field allows me to type random text/numbers. Is there a way I could force the user to type/select only date in that field. Looking for something similar to forceSelection on a combobox. Please advise.

    Thank you.

  2. For masking the datefield, you need to create a custom vtype and provide it with a regular expression which container permissible characters as per your date format.

    Though, just to share that if a user enters values as random text/numbers in a datefield, then that fields is marked as invalid by default, and also the form does not get submitted (provided you have used form.isValid() check before form submission). This way user can get to know that she has typed in wrong characters.

    In force selection too, a user is allowed to type in a value, though, on blur, that value is validated against the store and removed if not existing.

    Similarly, you can also do the same in datefield by calling a function on blur event and validate the date and remove it if format is wrong.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi