gene
gene

Reputation: 2108

Javascript alert doesn't print telerik datepicker value if it's a string

I'm trying to show a value I typed in a Telerik RadDatePicker control:

function validateDates() {

    var date1 = $('<%= RadDatePicker1.ClientID %>');
    alert(date1.value);
    return true;
}

When the sate is valid like 1/23/2009, it prints it, if I type a string value or leave it empty, the alert doesn't show anything.

Why is that?

I'm trying to validate the values before calling the server and need to figure this out.

Let me know please, what I'm missing.

Upvotes: 0

Views: 35

Answers (1)

rdmptn
rdmptn

Reputation: 5611

Get the reference to the client side component with $find and use its own client API, there should be something like .get_value()

Upvotes: 0

Related Questions