I have a list with fields for each months like Jan-Dec, so 12 columns in total.

I want to make a field disabled based on a condition like if the current month is June, disable the column (non-editable) of July (current month + 1). I want to do it by using jQuery.

1 Answer 1


I would use SPUtility.js for this one. Just to give you the idea of how this can be done:

// Define the current month
// GetSPFields - get an object containing all the fields on the page
var fields = SPUtility.GetSPFields();
for (fieldName in fields) {
    var field = SPUtility.GetSPField(fieldName);
    if (field != currentMonth) {


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.