Staggered-grid finite-difference (SFD) methods are widely used in modeling seismic-wave propagation, and the coefficients of finite-difference (FD) operators can be estimated by minimizing dispersion errors using Taylor-series expansion (TE) or optimization. We developed novel optimal time-space-domain SFD schemes for acoustic- and elastic-wave-equation modeling. In our schemes, a fourth-order multiextreme value objective function with respect to FD coefficients was involved. To yield the globally optimal solution with low computational cost, we first used variable substitution to turn our optimization problem into a quadratic convex one and then used least-squares (LS) to derive the optimal SFD coefficients by minimizing the relative error of time-space-domain dispersion relations over a given frequency range. To ensure the robustness of our schemes, a constraint condition was imposed that the dispersion error at each frequency point did not exceed a given threshold. Moreover, the hybrid absorbing boundary condition was applied to remove artificial boundary reflections. We compared our optimal SFD with the conventional, TE-based time-space-domain, and LS-based SFD schemes. Dispersion analysis and numerical simulation results suggested that the new SFD schemes had a smaller numerical dispersion than the other three schemes when the same operator lengths were adopted. In addition, our LS-based time-space-domain SFD can obtain the same modeling accuracy with shorter spatial operator lengths. We also derived the stability condition of our schemes. The experiment results revealed that our new LS-based SFD schemes needed a slightly stricter stability condition.