revert make appointment widget date sort null safe