Click here to Skip to main content
       

JavaScript

 
QuestionNeed help understanding binding PinmemberSteve Bondy7-Dec-12 14:00 
QuestionText replace Pinmemberrakeshs3126-Dec-12 23:06 
AnswerRe: Text replace PinmvpRichard MacCutchan7-Dec-12 0:43 
GeneralRe: Text replace Pinmemberrakeshs3129-Dec-12 5:40 
Thanks for the reply . i Found a solution like this
 
function ValidateTimeControl(s, e) {
    var isValidHour = true;
    var isValidMin = true;
    var hours, minutes;
    if (e.value != null) {
        if (e.value.substring(0, 1).trim() == "" || e.value.substring(1, 2).trim() == "" ) { 
            isValidHour = false;
        }
        if (e.value.substring(3, 4).trim() == "" || e.value.substring(3, 4).trim() == "") {
            isValidMin = false;
        }
        else {
            hours = parseInt(e.value.substring(0, 2), 10);
            minutes = parseInt(e.value.substring(3, 5), 10);
 
            if (hours > 12) {alert(hours)
                isValidHour = false;
                
            }
 
            if (minutes > 59) {
                isValidMin = false;
                
            }
        }
    }
    else {
        isValidHour = false;
        isValidMin = false;
    }
 
    if (isValidHour == false && isValidMin == false) {
        e.value = '00:00';
    } else if (isValidHour == false) {
        e.value = e.value.replace(hours, '00');
    } else if (isValidMin == false) {
        e.value = e.value.replace(minutes, '00');
    }
}<pre lang="Javascript">

QuestionJQuery datePicker SelectMultiple format dd/mm/yy PinmemberxnaLearner6-Dec-12 0:37 
AnswerRe: JQuery datePicker SelectMultiple format dd/mm/yy Pinmembersrinivas nv6-Dec-12 21:50 
GeneralRe: JQuery datePicker SelectMultiple format dd/mm/yy PinmemberxnaLearner10-Dec-12 0:04 
QuestionDelete selected rows by table id using javascript PinmemberMember 88023075-Dec-12 8:05 
AnswerRe: Delete selected rows by table id using javascript PinmemberDeepak Kr15-Dec-12 18:45 
GeneralRe: Delete selected rows by table id using javascript PinmemberMember 88023076-Dec-12 6:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.140814.1 | Last Updated 16 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid