# Jquery disable the already selected value not working

**URL:** <https://forum.radsystems.io/t/jquery-disable-the-already-selected-value-not-working/1262>\
**Category:** Uncategorized\
**Created:** [December 8, 2022, 4:43am UTC](https://forum.radsystems.io/t/jquery-disable-the-already-selected-value-not-working/1262 "2022-12-08T04:43:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![renato](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@renato](https://forum.radsystems.io/u/renato)\
**Post date:** [December 8, 2022, 4:43am UTC](https://forum.radsystems.io/t/jquery-disable-the-already-selected-value-not-working/1262/1 "2022-12-08T04:43:10Z")

</div>

i look up the already existed date value in other table. i would like to disable if it is already selected in this select field.

This is the code that i put in client events:  
$(‘#ctrl-date\_lookup’).on(‘change’, function(){  
$(‘option’).prop(‘disabled’, false);  
$(‘select’).each(function() {  
var val = this.value;  
$(‘select’).not(this).find(‘option’).filter(function() {  
return this.value === val;  
}).prop(‘disabled’, true);  
});  
}).change();

Thank you. I just recently bought a license, which is why I’m new to the RADSystem,

---

<div class="post-metadata">

**Author:** ![ddiaz](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/d/ee59a6/32.png) [@ddiaz](https://forum.radsystems.io/u/ddiaz)\
**Post date:** [January 19, 2023, 1:53pm UTC](https://forum.radsystems.io/t/jquery-disable-the-already-selected-value-not-working/1262/2 "2023-01-19T13:53:35Z")

</div>

What language and framework are you working on?
