Are $\hat x$ and $\hat p$ assumed to be time-independent operators? In the book Quantum Mechanics by Cohen-Tannoudji, at $G_{III}$, it is given that 

and then in the comment section, it is also given that

so I'm pretty confused in here, because in one side, they say they assume that the observables are time-independent observable. On the other hand, they given an example where an observable, namely the hamiltonian, is a function of time.
So my question is, are observables, in general, assumed to be time-independent operators in QM ? If so, why ? Is there an argument for such an assumption ?
Edit:
What about this answer ? See,

If $\hat{x},\hat{p}$ are time-independent, as in the Schroedinger
  picture, $k\hat{x}^2/2$ is time-independent as well.

 A: Whether operators like $\hat{x}$ and $\hat{p}$ in QM are time dependent or not depends on the picture you are using - generally either the Schroedinger picture or the Heisenberg picture or a hybrid interaction picture (useful for perturbative methods) - to carry out your calculations. 
In the Schroedinger picture, the operators are assumed to be static (time independent) objects which act on time-dependent state vectors: $\hat{x}_S|\Psi_S(t)\rangle$
In the Heiseinberg picture, the operators carry the time-dependence while the state vectors are time-independent: $\hat{x}_H (t)|\Psi_H\rangle$
In the interaction picture, both the operators and the state vectors carry time dependence: $\hat{x}_I(t)|\Psi_I (t)\rangle$
Which picture to use is really a matter of convenience and preference. We know that when we measure things like $\hat{x}$ for some given particle in state $|\Psi\rangle$ that generally the answer will depend on time. We can attribute this time dependence to either the state of the particle changing (e.g. Schroedinger's picture - which is generally the first picture that students are exposed to) or to the operator $\hat{x}$ itself changing (the Heisenberg picture) or to a combination of both of them changing (the interaction picture). 
Think of it in analogy to a passive vs active transformation of a vector. For example, say a given a vector $\vec{v}$ has components $(1,0,0)$ at time $t=0$ and later at time $t=1$ it has components $(0,1,0)$, we can think of this as the vector itself rotating from the x-axis to the y-axis during that time (Schroedinger picture) or we can think of this as the coordinate system rotated such that the original $\vec{v}$ which was aligned on the x-axis didn't change, but it's components changed in such a way that it is now pointing in the y-axis. These two views express the same final result and can't really be distinguished, in terms of physical predictions, from one another. 
This is for operators like $\hat{x}$ and $\hat{p}$ which measure properties of the particle itself. For an operator like $\hat{H}$ things are a bit more complicated because it includes things which are not properties of just the particle itself. $\hat{H}$ includes within it an external potential $\hat{V}$ which may be explicitly time dependent. Going back to the vector analogy, an operator like $\hat{H}$ would be like not simply looking at the components of the vector $\vec{v}$ itself, but also looking at how (components of) an "external vector" which is rotating with relation to $\vec{v}$ behaves. Generally when this is the case, one goes directly into the interaction picture and use time-dependent perturbation theory to find the relevant quantities. 
A: This question may have already received a decent answer on this website, but here goes my version.
The original textbook presentation of Quantum Mechanics first deals with the „Schrödinger picture” version of the theory (check here). This has the nice feature that the Hamiltonians and the rest of the operators (such as the coordinate and momentum you ask about) are assumed to be time-independent. However,  what usually puzzles the readers is that one is also allowed to include an explicit time-dependence in the potential energy operator only to discuss what people call „external interactions/perturbations”. The self-adjointness character (one of the requirements for an operator to represent an observable in the mathematical formalism) is easiest to be treated in a fully time-independent operator scheme, which is what the Schrödinger picture assumes. 
Once you read the rest of the textbook, which introduce you to the other two pictures (Heisenberg and interaction aka Dirac-Tomonaga-Schwinger), you can go back and fully understand why the authors begin with a time-independent operators setting and why all solved examples of QM only use the Schrödinger picture.
