$w.onReady( function () {
$w('#dropdown1, #inputNama, #dateSewa, #dropdown2, #dropdown3, #inputTujuan').onChange(function () {
if ($w('#dropdown1').value.length > 0 && $w('#inputNama').value.length > 0 && $w('#dateSewa').value.length > 0
&& $w('#dropdown2').value.length > 0 && $w('#dropdown3').value.length > 0 && $w('#inputTujuan').value.length > 0) {
$w('#buttonNext1').enable();
} else { $w('#buttonNext1').disable(); }
});
What is the value of $w('#dateSewa').value
? Is it null? Does it have a length?
it is a #datapicker element, not text
Since this value
is a Date
object it won’t have a length
property. When Datepickers don’t have a date set then value
is null
so you can change that part to $w('#dateSewa').value
and it should work:
$w.onReady( function () {
$w('#dropdown1, #inputNama, #dateSewa, #dropdown2, #dropdown3, #inputTujuan').onChange(function () {
if ($w('#dropdown1').value.length > 0 && $w('#inputNama').value.length > 0 && $w('#dateSewa').value
&& $w('#dropdown2').value.length > 0 && $w('#dropdown3').value.length > 0 && $w('#inputTujuan').value.length > 0) {
$w('#buttonNext1').enable();
} else { $w('#buttonNext1').disable(); }
});
Thank you, your information is very helpful to me. Terimakasih…