This is up to you. Some people prefer to have their legs fully extended out in front of them, and others like the have them bent at the knees. Either way is fine, as long as you’re not using your legs to help you press the dumbbells up. If you find yourself trying to engage your lower body during the exercise, keeping your legs straight is the best option to completely remove them from the exercise.