Time-dependent DFT calculations of the dipole moment and polarizability for excited states